Skip to content

Exclude vendored code from CodeQL, keep tests in scope - #355

Merged
CybotTM merged 1 commit into
mainfrom
ci/codeql-ignore-vendored
Aug 6, 2026
Merged

Exclude vendored code from CodeQL, keep tests in scope#355
CybotTM merged 1 commit into
mainfrom
ci/codeql-ignore-vendored

Conversation

@CybotTM

@CybotTM CybotTM commented Aug 6, 2026

Copy link
Copy Markdown
Member

Stops CodeQL reporting on third-party code we ship but do not maintain.

Why

Re-enabling JavaScript analysis across the t3x-* fleet (#348) surfaced 14 open alerts. Four of them are the same rule — js/bad-tag-filter — inside a single vendored file:

netresearch/t3x-nr-mcp-agent
  Resources/Public/JavaScript/Vendor/marked.esm.js:128, :147, :152, :190

That is a third-party markdown parser. The finding cannot be fixed in the consuming repository; the remedy is a version bump of the vendored library. Until then each alert is permanent noise that crowds out the ones somebody can act on.

What changes

The init step gains a config with paths-ignore for vendored trees:

paths-ignore:
  - '**/Vendor/**'
  - '**/vendor/**'
  - '**/node_modules/**'
  - '.Build/**'

Vendor/ (capitalised) is the TYPO3 convention for shipped third-party assets; vendor/, node_modules/ and .Build/ cover the Composer, npm and build trees.

What deliberately does not change

Test paths stay in scope, and that is the more important half of this change.

The first real finding this analysis produced was a credential logged in clear text by a Playwright login helper — js/clear-text-logging, HIGH, in netresearch/t3x-contexts, fixed in 07812f2a. Test code writes to CI logs like any other code, and a Build/** or Tests/** exclusion would have hidden exactly the class of leak the scanner exists to catch.

Effect

Four of the fourteen alerts disappear on the next scan, without anyone dismissing a finding by hand. The remaining ten are in first-party code and are being triaged individually.

Re-enabling JavaScript analysis surfaced 14 alerts across the t3x fleet.
Four of them are the same rule, js/bad-tag-filter, inside one vendored
file: Resources/Public/JavaScript/Vendor/marked.esm.js in
netresearch/t3x-nr-mcp-agent. That is a third-party parser we ship and do
not maintain. It cannot be fixed in the consuming repository — the remedy
is a version bump — and until then it crowds out the alerts that are
actionable.

The init step therefore ignores vendored trees: **/Vendor/**,
**/vendor/**, **/node_modules/** and .Build/**.

Test paths are deliberately NOT excluded, and that is the more important
half of this change. The first real finding this analysis produced was a
credential logged in clear text by a Playwright login helper
(netresearch/t3x-contexts, fixed in 07812f2a) — test code writes to CI
logs like any other code, and excluding it would have hidden exactly the
kind of leak the scanner exists to catch.

Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
Copilot AI lite review requested due to automatic review settings August 6, 2026 08:32
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CybotTM
CybotTM merged commit eb7d69d into main Aug 6, 2026
12 of 13 checks passed
@CybotTM
CybotTM deleted the ci/codeql-ignore-vendored branch August 6, 2026 09:37
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