Skip to content

Commit 8eb0eb7

Browse files
author
Martin Vogel
committed
ci(codeql): revert CodeQL gate hardening from 27e640b
Reverts the CodeQL portion of 27e640b ('fix(mcp,ci): harden get_architecture serialization + CodeQL gate'). Leaves the mcp.c + test_mcp.c changes (NULL-coercion, clusters/services serialization, extract_text_content fix, regression test) intact. Restored to the pre-27e640b state: - drop 'jq' from build-deps install line - drop 'queries: +./codeql' from codeql-action/init (no ./codeql custom-query directory exists in this repo) - drop 'id: analyze' and 'output: codeql-results' on analyze step - drop the SARIF-parsing 'Fail on CodeQL error-level findings' step CI workflow changes need their own design discussion per CONTRIBUTING.md ('Project configuration / CI workflows' is in the explicit-approval list); the gate hardening landed bundled with an unrelated bug fix. Splitting it out so the upstream MCP fix stays clean and any future CodeQL gate work can be its own focused PR.
1 parent db23d56 commit 8eb0eb7

1 file changed

Lines changed: 1 addition & 23 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,18 @@ jobs:
1515
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1616

1717
- name: Install build dependencies
18-
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev jq
18+
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
1919

2020
- name: Initialize CodeQL
2121
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
2222
with:
2323
languages: c-cpp
2424
build-mode: manual
25-
queries: +./codeql
2625

2726
- name: Build for CodeQL analysis
2827
run: scripts/build.sh
2928

3029
- name: Perform CodeQL Analysis
31-
id: analyze
3230
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
3331
with:
3432
category: "/language:c-cpp"
35-
output: codeql-results
36-
37-
- name: Fail on CodeQL error-level findings
38-
run: |
39-
sarif=$(find codeql-results -name '*.sarif' | head -1)
40-
if [[ -z "$sarif" ]]; then
41-
echo "::error::No SARIF output found"; exit 1
42-
fi
43-
err=$(jq '[.runs[].results[]? | select((.level // "warning") == "error")] | length' "$sarif")
44-
warn=$(jq '[.runs[].results[]? | select((.level // "warning") == "warning")] | length' "$sarif")
45-
echo "CodeQL findings: $err error(s), $warn warning(s)"
46-
if [[ "$err" -gt 0 ]]; then
47-
jq -r '
48-
.runs[].results[]?
49-
| select((.level // "warning") == "error")
50-
| "\(.locations[0].physicalLocation.artifactLocation.uri):\(.locations[0].physicalLocation.region.startLine) [\(.ruleId)] \(.message.text)"
51-
' "$sarif"
52-
echo "::error::$err CodeQL error-level finding(s) — failing build."
53-
exit 1
54-
fi

0 commit comments

Comments
 (0)