Repository navigation
fix(ci): scan Vue/Svelte/Astro/Go files as code, not as disguised payloads - #220
Merged
Merged
Conversation
…loads The disguised-code rule flags JavaScript inside a file whose extension isn't a known code type. .vue single-file components legitimately contain <script> blocks, so docforum-core #207 was blocked by a false positive. Add vue, svelte, astro, less, sass, go, mod and sum to the text/code extension list; every line rule still runs on them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The malware scan's
disguised-coderule fires when a file whose extension isn't a known code type contains JavaScript. That catches payloads hidden as fonts or images, like the one in escrow #163. But.vuesingle-file components legitimately contain<script>blocks, so docforum-core #207 (docs/site/api/ApiReference.vue) was flagged HIGH, and becauseMalware scanis a required check, it was blocked.Change:
vue,svelte,astro,less,sass,go,modandsumare added to the scanner's code/text extension list. These files are still scanned by every line rule (pipe-to-shell, exfiltration endpoints, decode-and-run and so on); they're just no longer treated as "this shouldn't contain code". Real media files (fonts, images, archives,.wasm) are unchanged.Tested with the scanner harness against live PRs:
high=1 [disguised-code], afterhigh=0.pull_request_targetruns the scanner frommain, so this takes effect once merged. I'll then re-scan core #207 with the backfill.🤖 Generated with Claude Code