Skip to content

Commit 83df500

Browse files
committed
fix(build,ci): make the integrations-hash generator runnable and quiet a JSON-license false positive
Two CI failures on the integration-asset change, both build/gate plumbing, not the architecture: 1. scripts/gen-integrations-hash.sh was committed 100644 while Makefile.cbm invoked it directly, so a fresh CI checkout died with "Permission denied" building the hash header — which failed EVERY test leg at step 0, since the contract step builds first. It passed locally only because the generated header was already cached, so make never re-ran the generator. Fixed both ways: the recipe now runs it via `sh` (mode-independent, cannot regress from a checkout mode), and the file is committed 100755 to match its siblings. Note: test_script_exec_bit_contract.sh scans shell call sites, not Makefile recipes, so it did not catch this — the `sh` prefix is the durable guard. 2. The license gate (ScanCode) flagged scripts/package-release.sh with the SPDX 'JSON' license. The archive member lists place 'cbm-integrations.json' and 'LICENSE' adjacently, and ScanCode reads the '.json LICENSE' token adjacency as a JSON-license reference. The order is not free to change — the Windows single-binary contract locks the exact member sequence — so this is a genuine false positive on a first-party MIT build script. Added it to the policy's ignored_paths with the same justification the six existing first-party entries carry (the gate scripts, provenance auditor, and discover.c all name licenses for legitimate reasons). No allow-listed SPDX id was added; the JSON license is NOT now permitted anywhere else. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent a6f132b commit 83df500

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎Makefile.cbm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ BUILD_DIR = build/c
699699
# Integration-asset hash header (variables defined next to PROJECT_HDRS; the
700700
# rule lives here because target lines expand $(BUILD_DIR) immediately).
701701
$(INTEGRATIONS_HASH_HDR): $(INTEGRATIONS_ASSET) scripts/gen-integrations-hash.sh | $(BUILD_DIR)
702-
scripts/gen-integrations-hash.sh $(INTEGRATIONS_ASSET) $@
702+
sh scripts/gen-integrations-hash.sh $(INTEGRATIONS_ASSET) $@
703703

704704
# ── Object file compilation (grammars need relaxed warnings) ─────
705705

‎scripts/gen-integrations-hash.sh‎

100644100755
File mode changed.

‎scripts/license-policy.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
"LicenseRef-scancode-public-domain",
1717
"LicenseRef-scancode-public-domain-disclaimer"
1818
],
19-
"_ignored_paths_comment": "Path prefixes (relative to the staged scan tree) excluded from the gate. Use ONLY for documented false positives. Justifications: the license tooling itself (gate scripts + this policy file) necessarily names prohibited licenses; gen-third-party-notices.sh echoes license terminology; audit-license-provenance.py names licenses in its verdict maps; src/discover/discover.c contains a license-FILENAME classification list (LICENSE-MIT, LICENSE-APACHE, ...) for file discovery, which ScanCode reads as license references.",
19+
"_ignored_paths_comment": "Path prefixes (relative to the staged scan tree) excluded from the gate. Use ONLY for documented false positives. Justifications: the license tooling itself (gate scripts + this policy file) necessarily names prohibited licenses; gen-third-party-notices.sh echoes license terminology; audit-license-provenance.py names licenses in its verdict maps; src/discover/discover.c contains a license-FILENAME classification list (LICENSE-MIT, LICENSE-APACHE, ...) for file discovery, which ScanCode reads as license references; package-release.sh lists the archive members 'cbm-integrations.json LICENSE ...' adjacently (an order the Windows single-binary contract locks), and ScanCode reads the '.json LICENSE' token adjacency as a reference to the SPDX 'JSON' license — a first-party MIT build script, not vendored code.",
2020
"ignored_paths": [
2121
"tree/scripts/license-policy.json",
2222
"tree/scripts/license-gate-check.py",
2323
"tree/scripts/license-gate.sh",
2424
"tree/scripts/gen-third-party-notices.sh",
2525
"tree/src/discover/discover.c",
26-
"tree/scripts/audit-license-provenance.py"
26+
"tree/scripts/audit-license-provenance.py",
27+
"tree/scripts/package-release.sh"
2728
]
2829
}

0 commit comments

Comments
 (0)