Repository navigation
fix(security): resolve CodeQL include alert #1309 and Scorecard SAST alert #6 (ADR-1389) - #1659
Merged
Merged
Conversation
lusoris
force-pushed
the
fix/code-scanning-include-and-sast
branch
from
October 1, 2026 08:21
cf20eb8 to
4cf5c4b
Compare
…alert #6 (ADR-1389) - Resolve CodeQL alert #1309 (cpp/include-non-header): Replace unity-inclusion of core/src/libvmaf.c in core/test/test_feature_backend_twin.c with direct linkage against libvmaf in core/test/meson.build and narrow internal test accessors in core/src/libvmaf_priv.h (vmaf_backend_twin_verdict_for_test, vmaf_context_fake_backend_for_test, vmaf_context_set_gpumask_for_test, vmaf_context_append_registered_feature_extractor_for_test, and vmaf_context_resolve_context_fallbacks_for_test) implemented statically in core/src/libvmaf.c. - Add scripts/ci/check-no-non-header-includes.sh and test suite scripts/ci/tests/test-check-no-non-header-includes.sh, wired into .pre-commit-config.yaml and .github/workflows/rule-enforcement.yml to fail closed on non-header source inclusions in core/test/. - Resolve OpenSSF Scorecard alert #6 (SAST): Under ADR-1389, run CodeQL (Actions) unconditionally on every pull request and master push in .github/workflows/security-scans.yml, ensuring 100% commit SAST coverage across docs-only and non-code PRs with negligible (~15-20s) overhead, and enforce it in .github/workflows/required-aggregator.yml. - Update docs/state.md, changelog fragment, docs/rebase-notes.md, and ADR index.
lusoris
force-pushed
the
fix/code-scanning-include-and-sast
branch
from
October 1, 2026 08:36
4cf5c4b to
2564e5d
Compare
This was referenced Oct 1, 2026
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.
Summary
Closes two open code-scanning alerts on
master:cpp/include-non-header): Replaces unity-inclusion ofcore/src/libvmaf.cincore/test/test_feature_backend_twin.cwith direct linkage againstlibvmafincore/test/meson.buildand narrow internal test accessors incore/src/libvmaf_priv.h/core/src/libvmaf.c. Addsscripts/ci/check-no-non-header-includes.shto pre-commit and CI rule enforcement to prevent future non-header includes undercore/test/.SASTID): Under ADR-1389, runsCodeQL (Actions)unconditionally on every pull request and push to master in.github/workflows/security-scans.yml, ensuring 100% commit SAST coverage across docs-only and non-code PRs with negligible (~15–20s) overhead, enforced in.github/workflows/required-aggregator.yml.Type
fix— bug fixbuild/ci— tooling / infraChecklist
make format && make lintis green locally.python3 scripts/ci/run_meson_test.py -- -C build./cross-backend-diffand the worst ULP is ≤ 2..c/.cpp/.cu/.h/.hpp, it has the appropriate license header (seeCONTRIBUTING.md).!orBREAKING CHANGE:and the migration path is documented below.docs/adr/_index_fragments/<NNNN-slug>.mdand the slug is appended todocs/adr/_index_fragments/_order.txt— do not editdocs/adr/README.mddirectly (regenerated byscripts/docs/concat-adr-index.sh; see ADR-0221).Bug-status hygiene (ADR-0165)
docs/state.mdupdated in this PR with a row in the appropriate section (Open / Recently closed / Confirmed not-affected / Deferred), ORno state delta: REASON.Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
## Alternatives consideredin ADR-1389.AGENTS.mdinvariant note — added toscripts/ci/AGENTS.mddocumentingcheck-no-non-header-includes.sh.changelog.d/fixed/code-scanning-include-and-sast.mdadded.docs/rebase-notes.mdunderfix/code-scanning-include-and-sast.Reproducer
Known follow-ups
Alerts #1 (CodeReview) and #1054 (BranchProtection) are structural organization-level settings and remain out of scope for this code PR.