Skip to content

ci: exclude the test tree from CodeQL analysis - #16

Merged
00o-sh merged 1 commit into
mainfrom
claude/combine-source-map-onboard-9bfvyz
Aug 14, 2026
Merged

ci: exclude the test tree from CodeQL analysis#16
00o-sh merged 1 commit into
mainfrom
claude/combine-source-map-onboard-9bfvyz

Conversation

@00o-sh

@00o-sh 00o-sh commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What & why

CodeQL surfaced parse-error diagnostics on intentionally-malformed test fixtures:

test/error_code/src.js: A parse error occurred: `'var' can not be used as shorthand property`
test/syntax_cache/invalid.js: A parse error occurred: `Unexpected token`

Those files are deliberately invalid — they exist so browserify's tests can exercise its syntax-error handling. CodeQL can't parse them (by design), so it logs noise. Fork test trees also run bundles through vm.runInNewContext(...), which trips CodeQL's code-injection heuristics as false positives.

Neither the fixtures nor the harness is the security target for a library — the shipped code (index.js, lib/, bin/) is.

Change

Add a paths-ignore to the reusable CodeQL workflow's init step (inline config) so test/ and tests/ are excluded from analysis:

config: |
  paths-ignore:
    - test
    - tests

Applies to every fork through the shared reusable workflow — one change, no per-repo edits.

Rollout

Forks pick it up when their unabandoned/.github digest pin bumps (Renovate — and those bumps now auto-merge on green, via renovate-config #17). The diagnostic is non-blocking in the meantime.

Type of change

  • fix / feat / perf — consumer-facing
  • deps — dependency update
  • chore / ci / build / docs / test / refactor — maintenance (ci)

Checklist

  • Workflow YAML + inline CodeQL config validated
  • Commits follow Conventional Commits

Generated by Claude Code

CodeQL was emitting parse-error diagnostics for intentionally-malformed
fixtures (e.g. browserify's test/error_code/src.js and
test/syntax_cache/invalid.js), which exist to exercise forks' syntax-error
handling. Fork test suites also run bundles through vm.runInNewContext, which
trips CodeQL's code-injection heuristics as false positives.

Scan the shipped library code, not the test tree: add a paths-ignore for
test/ and tests/ via the init action's inline config. Applies to every fork
through the shared reusable workflow.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UcmNgwVhqkNE1eViGYLnJ9
@00o-sh
00o-sh merged commit 9f2cc43 into main Aug 14, 2026
2 checks passed
@00o-sh
00o-sh deleted the claude/combine-source-map-onboard-9bfvyz branch August 14, 2026 03:04
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