Skip to content

fix: close security scan findings and license checks - #140

Merged
anchildress1 merged 15 commits into
mainfrom
fix/security-scan-findings
Oct 11, 2026
Merged

anchildress1 merged 15 commits into
mainfrom
fix/security-scan-findings

Conversation

@anchildress1

@anchildress1 anchildress1 commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Run CI on every non-draft PR and push regardless of branch name, so a crafted branch name can no longer skip checks.
  • Commitlint now runs on every non-draft PR. On Dependabot and Release Please PRs, it walks the full git range and skips only verified commits authored by that bot, so human pushes onto the branch are still linted.
  • CI runs the locked commitlint binary instead of npx (Sonar S6505/S8543).
  • Remove the Dependabot ignores entry from commitlint.config.js, since its message text could be forged; the config is now type-checked via JSDoc @satisfies.
  • Correct SPDX AND/OR policy checks in the license checker, including CycloneDX expressions; every declared CycloneDX license entry must be allowed, and PyPI trove classifiers map to allow-list ids.
  • Confine the license checker's input path to the working directory (Sonar pythonsecurity:S8707).
  • Exclude .github/** from Sonar coverage, since the license checker's tests run in the security audit workflow without coverage reporting.
  • Remove packaging exclusions that emitted build warnings while preserving the source archive contents.

Validation

  • make ai-checks passed: 49 Node and 56 Python tests, both at 100% coverage.
  • python3 .github/scripts/test_check_licenses.py passed all 31 cases, including a subprocess check that a path outside the working directory is rejected.
  • actionlint .github/workflows/test-and-build.yml passed.
  • Commitlint passed on origin/main..HEAD.
  • Release Please exemption checked against chore: release main #136: its release commit is authored by github-actions[bot] and GitHub-verified.
  • Sonar snippet analysis reports 0 issues in the changed license checker.

- run CI checks for main pushes and non-draft PRs regardless of branch name
- exempt Dependabot by PR identity instead of spoofable message text
- reject attribution and signoffs discarded by Git scissors

Generated-by: Codex <noreply@openai.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- evaluate SPDX choices and obligations in Node, Python, and CycloneDX reports
- reject disallowed conjunctions and malformed expressions with regression cases
- remove manifest exclusions that emitted empty-match warnings

Generated-by: Codex <noreply@openai.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 21:01
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new commitlint condition would block generated Release Please pull requests.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Hardens CI and footer validation, corrects SPDX license-expression checks, and cleans Python packaging configuration.

Changes:

  • Removes unsafe CI/commitlint bypasses.
  • Ignores content after Git scissors markers.
  • Adds SPDX/CycloneDX license parsing and regression coverage.
File Description
packages/​python-gitlint/​MANIFEST.in Removes redundant exclusions.
packages/​node-commitlint/​tests/​rai-signed-off-by.test.ts Tests scissors handling.
packages/​node-commitlint/​tests/​rai-footer-exists.test.ts Tests attribution before/after scissors.
packages/​node-commitlint/​tests/​integration.test.ts Adds policy integration tests.
packages/​node-commitlint/​src/​rules/​rai-signed-off-by.ts Excludes discarded scissors content.
packages/​node-commitlint/​src/​rules/​rai-footer-exists.ts Excludes discarded scissors content.
docs/​architecture.md Documents Node/Python behavior.
commitlint.config.js Removes message-based Dependabot bypass.
.github/​workflows/​test-and-build.yml Reworks CI job conditions.
.github/​scripts/​test_check_licenses.py Expands license-checker coverage.
.github/​scripts/​check-licenses.py Parses SPDX and CycloneDX licenses.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/test-and-build.yml Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df5b954be1

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

Comment thread .github/workflows/test-and-build.yml Outdated
- revert scissors-marker truncation in rai-footer-exists and rai-signed-off-by
- diff lines under the marker can never match the anchored footer patterns
- CI lints committed history, where git has already discarded scissors content
- restore the documented gitlint input nuance and remove the scissors tests
- recovers the 436-byte bundle growth flagged by bundle analysis

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- mark commitlint.config.js with a JSDoc @Satisfies UserConfig so rule tuples keep literal types
- drop the stale ignores option the config no longer exports

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- drop job-level Dependabot exemption so commitlint runs on every non-draft PR
- on Dependabot and Release Please PRs, skip only verified commits from that bot
- lint every other commit on those PRs, so pushes onto a bot branch stay checked
- release exemption requires github-actions[bot] author plus a release-please-- branch

Generated-by: Codex <noreply@openai.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- resolve the JSON path argument and reject anything outside the cwd
- closes Sonar pythonsecurity:S8707 path traversal on the CLI argument

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- license checker tests run in the security audit workflow without coverage reporting
- unreported coverage on .github sources was failing the new-code coverage gate

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>

@anchildress1 anchildress1 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review pass: 2 findings, both fixed locally and not yet pushed.

Comment thread .github/scripts/check-licenses.py
Comment thread packages/node-commitlint/tests/integration.test.ts
- map OSI Apache, BSD, ISC, MIT and PSF classifiers to allow-list ids before SPDX parsing
- cyclonedx-py emits classifiers verbatim, so arrow and python-dateutil failed the audit
- unknown classifiers such as GPL still fail closed; add 3 regression cases

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- forward commitlint.config.js ignores into lint() so a reintroduced bypass fails the test

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- call node_modules/.bin/commitlint so CI never fetches an unpinned package
- clears Sonar githubactions:S6505 and S8543 on the commitlint step

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
@anchildress1
anchildress1 requested a balanced review from Copilot October 3, 2026 00:19
@anchildress1

Copy link
Copy Markdown
Owner Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

CycloneDX multi-license entries can bypass policy, and bot PR filtering can omit commits beyond GitHub’s API limit.

Review effort: Balanced
Findings: 2 Medium severity · 1 Low severity

Open (3)
Resolved since last review (1)

Comment thread .github/scripts/check-licenses.py Outdated
Comment thread .github/workflows/test-and-build.yml Outdated
Comment thread .github/scripts/check-licenses.py
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 538f72e331

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

- join multiple component license entries with AND instead of accepting any one
- map trove classifiers per entry so multi-classifier components still resolve
- add regression cases for MIT plus GPL-3.0 and dual BSD declarations

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- run the checker in a subprocess from a temp dir and assert outside paths exit 1

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
- iterate git rev-list instead of the PR commits API, which caps at 250 entries
- use the API only as an allowlist of verified bot commits so omissions fail closed

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
@anchildress1
anchildress1 requested a balanced review from Copilot October 5, 2026 20:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/scripts/check-licenses.py
Comment thread .github/workflows/test-and-build.yml
Comment thread .github/workflows/test-and-build.yml
Comment thread .github/workflows/test-and-build.yml
Comment thread .github/workflows/test-and-build.yml
Comment thread .github/workflows/test-and-build.yml
Comment thread packages/node-commitlint/tests/integration.test.ts
Comment thread packages/python-gitlint/MANIFEST.in
Comment thread .github/workflows/test-and-build.yml
- state the accepted SPDX operators, precedence, and fail-closed constructs

Generated-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ashley Childress <anchildress1@gmail.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

@anchildress1
anchildress1 merged commit afb75fb into main Oct 11, 2026
15 checks passed
@anchildress1
anchildress1 deleted the fix/security-scan-findings branch October 11, 2026 14:06
@github-actions github-actions Bot mentioned this pull request Oct 11, 2026
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