Skip to content

security(ci): scan tracked files for known repository-malware markers - #596

Open
umpireboulianne-design wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
umpireboulianne-design:fix/issue-480
Open

umpireboulianne-design wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
umpireboulianne-design:fix/issue-480

Conversation

@umpireboulianne-design

Copy link
Copy Markdown

Summary

Adds a static, text-only scanner (scripts/check-malware-markers.mjs) and unit test suite (scripts/check-malware-markers.test.mjs) that scans tracked source and configuration files for known repository-malware markers without evaluating matched content.

Fixes #480
Closes #480

Changes

  • scripts/check-malware-markers.mjs:
    • Detect rmcej%otb%, Cot%3t=shtP, MicrosoftSystem64, .pcl-data, and .pcl-state.
    • Exclude .git, dependencies (node_modules, .pnpm-store), build/artifact outputs (dist, build, target, artifacts, coverage, .turbo, tmp-bindings), and the scanner/test files themselves.
    • Report only the matched marker name and relative file path (MATCH marker=<name> path=<path>), never the full line.
  • scripts/check-malware-markers.test.mjs: Add positive and negative tests covering all 5 required markers, line-redaction formatting, and excluded directory/test-fixture filtering.
  • package.json: Add malware:check and malware:test scripts and wire them into the CI check suite.
  • docs/CI.md: Document the malware marker scanner and instructions for updating MALWARE_MARKERS.

…Sub-Rosa-Issue#480)

Add static text-only malware marker scanner and unit tests covering rmcej%otb%, Cot%3t=shtP, MicrosoftSystem64, .pcl-data, and .pcl-state, wire into CI, and document marker update workflow in docs/CI.md.

Fixes Sub-Rosa-Issue#480
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.

security(ci): scan tracked files for known repository-malware markers

1 participant