Skip to content

Revert "harden: fix security issue in prepare-overview-review.py" - #2

Closed
exsinger-hub wants to merge 1 commit into
mainfrom
revert-1-fix-repo-sivia-xxe-prepare-overview-review
Closed

exsinger-hub wants to merge 1 commit into
mainfrom
revert-1-fix-repo-sivia-xxe-prepare-overview-review

Conversation

@exsinger-hub

Copy link
Copy Markdown
Owner

revert

Copilot AI lite review requested due to automatic review settings September 9, 2026 08:39
@exsinger-hub
exsinger-hub deleted the revert-1-fix-repo-sivia-xxe-prepare-overview-review branch September 9, 2026 08:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

It reintroduces a previously fixed XML parsing security risk by reverting from defusedxml back to stdlib minidom for parsing PPTX-provided XML.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR reverts a prior security hardening change in scripts/prepare-overview-review.py by switching XML parsing imports back to Python’s standard library xml.dom.minidom.

Changes:

  • Replace defusedxml.minidom with stdlib xml.dom.minidom.
  • Replace pyexpat.ExpatError import with xml.parsers.expat.ExpatError.
File summaries
File Description
scripts/prepare-overview-review.py Reverts hardened XML parser imports back to stdlib minidom for PPTX XML parsing.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +28 to +29
from xml.dom import minidom
from xml.parsers.expat import ExpatError

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 916a527f4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +28 to +29
from xml.dom import minidom
from xml.parsers.expat import ExpatError

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the defused XML parser

When this helper processes an untrusted PPTX, its presentation.xml, relationship XML, or selected slide XML can contain nested internal entity declarations. xml.dom.minidom.parseString expands those entities before the script's validation runs, allowing a crafted package to consume substantial CPU and memory; the reverted defusedxml parser rejects such declarations. Keep the hardened parser (and declare its dependency) or explicitly reject DTD/entity-bearing XML.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants