Skip to content

Keep scan_packages.py clear of Bitdefender's Python stealer signature again - #19245

Merged
danielhanchen merged 1 commit into
mainfrom
scan-packages-av-comments
Nov 24, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
scan-packages-av-comments

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Keep scan_packages.py clear of Bitdefender's Python stealer signature again

scripts/scan_packages.py on main is flagged again on VirusTotal as Generic.PY.STEALER.B, the same detection #12169 fixed in September. Bitdefender, and every engine that ships its signatures, quarantines the file on a contributor's machine.

What changed

Comments only. The comment trim in #12969 shortened several comment blocks near the top of the file; that is what brought the detection back. This restores those comments (the 28 edits above the anti-analysis patterns) and keeps the rest of the trim. The parsed code is identical to main (same ast.dump), so behaviour does not change.

One line is added above _joined noting that trimming the comments there re-triggered it, so the next cleanup rescans the file.

Evidence (VirusTotal, fresh uploads, 2026-11-24)

Version of scripts/scan_packages.py Detections
After #12169 (Sep 27) and after #12884 (Oct 6) 0
After #12969 (Oct 26) 8: ALYac, Arcabit, BitDefender, Emsisoft, GData, MicroWorld-eScan, VIPRE Generic.PY.STEALER.B; CTX script.spyware.generic
main today (after #16112) the same 8
main with the top 28 comment edits reverted 0
This PR 0 / 72 (sha256 29cb47f1b33b57815d75a1a76476c53b068ce452068c8569d10ea2f949b968af)

Bisecting the 110 comment edits between #12884 and main: applying only edits 55 to 110 stays clean, while several small subsets of edits 0 to 21 each bring the detection back on their own. The detection reacts to how much comment text separates the pattern tables near the top of the file, not to any single word.

Tests

  • tests/security/test_scan_packages.py, tests/security/test_lint_av_shapes.py, tests/test_scripts_write_lf.py: 181 passed.
  • scripts/lint_av_shapes.py: 0 new errors. Pre-commit ruff clean.

Not covered

  • Engines can change their signatures at any time; this is clean against today's.
  • Other files were not affected: the installers, setup scripts, uninstallers, studio/install_*.py helpers and scan_npm_packages.py on main are all 0 detections today.

… again

The comment trim in #12969 brought back Generic.PY.STEALER.B on 8
Bitdefender-engine scanners (ALYac, Arcabit, BitDefender, Emsisoft, GData,
MicroWorld-eScan, VIPRE) plus CTX. Bisecting the 110 comment edits on
VirusTotal showed the trigger is the shortened comments near the top of
the file. Restoring those comments clears every engine; code is
unchanged (identical AST).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T12:16:56.085705Z 2fa6d4b Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 2fa6d4bfec

ℹ️ 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".

@danielhanchen
danielhanchen merged commit b419f03 into main Nov 24, 2026
1 of 25 checks passed
@danielhanchen
danielhanchen deleted the scan-packages-av-comments branch November 24, 2026 12:48
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.

1 participant