Skip to content

Fix python.lang.security.audit.eval-detected.eval-detected--tmp-ec39a9d3-d091-4e8f-8a28-4db0bf4bdd45-misc-ocrmypdf_compare.py #1515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions misc/ocrmypdf_compare.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ast
# SPDX-FileCopyrightText: 2025 James R. Barlow
# SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -78,16 +79,16 @@ def main():
return
with st.spinner("Executing..."):
Path(d, "input.pdf").write_bytes(pdf_bytes)
run(args1, env=dict(os.environ, **eval(env1 or "{}")))
run(args2, env=dict(os.environ, **eval(env2 or "{}")))
run(args1, env=dict(os.environ, **ast.literal_eval(env1 or "{}")))
run(args2, env=dict(os.environ, **ast.literal_eval(env2 or "{}")))

col1, col2 = st.columns(2)
with col1:
st.text(
"Ghostscript version A: "
+ check_output(
["gs", "--version"],
env=dict(os.environ, **eval(env1 or "{}")),
env=dict(os.environ, **ast.literal_eval(env1 or "{}")),
text=True,
)
)
Expand All @@ -96,7 +97,7 @@ def main():
"Ghostscript version B: "
+ check_output(
["gs", "--version"],
env=dict(os.environ, **eval(env2 or "{}")),
env=dict(os.environ, **ast.literal_eval(env2 or "{}")),
text=True,
)
)
Expand Down
Loading