44
55Status: completed
66
7- Sub-state: Codacy Cloud remaining findings were fixed locally and scanner
8- validation passed .
7+ Sub-state: Completed after restoring the approved hygiene checks and validating
8+ the scanner/test matrix .
99
1010## Requirements
1111
@@ -189,6 +189,10 @@ Open decisions:
189189- 2026-06-02: The user decided that active scanner findings must be fixed or the
190190 rule must be removed/tuned. Keeping a rule while hiding its output from one UI
191191 is not acceptable.
192+ - 2026-06-03: The user approved restoring all recommended hygiene checks:
193+ staticcheck as a hard gate, Codacy Local as a hard gate, selected CodeQL
194+ hygiene/security query IDs, and selected gosec rules for unchecked errors,
195+ integer conversions, file permissions, path traversal, and unsafe usage.
192196
193197## Plan
194198
@@ -234,20 +238,51 @@ Open decisions:
234238 disabled, 7 tools reconfigured, 2,727 patterns enabled, and reanalysis
235239 requested.
236240
241+ ### 2026-06-03
242+
243+ - Recorded the user decision to restore all recommended hygiene checks.
244+ - Made ` staticcheck ` a hard gate in ` .github/workflows/static-analysis.yml ` .
245+ - Made Codacy Local Analysis fail the workflow when the Codacy Analysis CLI
246+ reports a non-zero status.
247+ - Restored selected CodeQL hygiene/security query IDs by removing their
248+ ` query-filters ` exclusions.
249+ - Restored gosec rules ` G103 ` , ` G104 ` , ` G115 ` , ` G304 ` , ` G306 ` , and ` G703 ` ;
250+ only ` G404 ` remains excluded because the approved restore list did not include
251+ insecure random findings.
252+ - Fixed production Go integer-conversion findings in protocol and raw service
253+ code with checked conversions.
254+ - Converted unchecked cleanup calls to explicit ignored cleanup results, and
255+ added narrow ` #nosec ` comments only for intentional mmap, futex, syscall, and
256+ fixture path patterns.
257+ - Fixed fixture and benchmark findings from restored gosec rules.
258+ - Removed Codacy Revive from local Codacy configuration after direct Revive
259+ execution passed but the Codacy adapter failed with `findings is not
260+ iterable`.
261+ - Added Semgrep-only excludes for parser-incompatible Windows C fixtures and
262+ two scripts that are still covered by ShellCheck, cppcheck, CodeQL, or the
263+ dedicated static workflow.
264+ - Changed the production C SHM path format string to avoid a Semgrep parser
265+ failure on the ` PRIx64 ` macro while preserving the same hexadecimal session
266+ ID output.
267+
237268## Validation
238269
239270Acceptance criteria evidence:
240271
241- - Current enabled Codacy local rules produce zero findings with 7 enabled tools
242- and 2,727 enabled patterns.
243- - Current GitHub Code Scanning result-bearing CodeQL query IDs are excluded via
244- ` .github/codeql.yml ` ` query-filters ` .
245- - Current GitHub gosec result-bearing rule IDs are excluded in
246- ` .github/workflows/static-analysis.yml ` , while gosec remains active for all
247- other rules and will fail the job if future enabled findings appear.
248- - Semgrep OSS now scans secrets only in
249- ` .github/workflows/supply-chain-security.yml ` ; Codacy Semgrep/Opengrep
250- remains active for the tuned zero-current-finding pattern set.
272+ - Codacy local analysis now produces zero findings and zero tool errors with
273+ 6 enabled tools and 2,706 enabled patterns.
274+ - ` .github/codeql.yml ` restores the approved CodeQL hygiene/security query IDs.
275+ The remaining excluded query IDs are ` cpp/poorly-documented-function ` ,
276+ ` cpp/redundant-null-check-simple ` , and ` rust/unused-variable ` .
277+ - ` .github/workflows/static-analysis.yml ` restores gosec rules
278+ ` G103 ` , ` G104 ` , ` G115 ` , ` G304 ` , ` G306 ` , and ` G703 ` ; only ` G404 ` remains
279+ excluded.
280+ - ` staticcheck ` is a hard gate in ` .github/workflows/static-analysis.yml ` .
281+ - ` .github/workflows/codacy-analysis.yml ` now fails when the Codacy Analysis
282+ CLI reports a non-zero status.
283+ - Codacy Semgrep/Opengrep remains active; only parser-incompatible Windows C
284+ fixtures and two scripts are excluded for Semgrep, while other scanners still
285+ cover them.
251286- Scorecard is no longer uploaded as Code Scanning SARIF; it remains available
252287 as a JSON posture artifact.
253288
@@ -259,15 +294,14 @@ Tests or equivalent validation:
259294 ` .github/workflows/static-analysis.yml ` , and
260295 ` .github/workflows/supply-chain-security.yml ` .
261296- ` actionlint ` passed.
262- - ` codacy-analysis analyze . --inspect --output-format json --output /tmp/plugin-ipc-codacy-inspect-sow0010-after.json `
263- reported 7 ready tools and zero unavailable tools.
264- - ` codacy-analysis analyze . --output-format sarif --output /tmp/plugin-ipc-codacy-sow0010-after.sarif --parallel-tools 2 --tool-timeout 900000 `
265- reported zero issues. The CLI logged 15 non-fatal tool errors: 14 Semgrep
266- and 1 Revive parser/runtime errors.
297+ - ` codacy-analysis analyze . --install-dependencies --output-format json --output /tmp/plugin-ipc-codacy.json --parallel-tools 2 --tool-timeout 900000 `
298+ reported zero issues and zero tool errors.
299+ - ` codacy-analysis analyze . --install-dependencies --output-format sarif --output /tmp/plugin-ipc-codacy.sarif --parallel-tools 2 --tool-timeout 900000 `
300+ reported zero SARIF results.
267301- ` semgrep scan --metrics=off --config p/secrets --sarif --output /tmp/plugin-ipc-semgrep-secrets.sarif . `
268302 completed with zero findings.
269- - Local gosec with ` -exclude=G103,G104,G115,G304,G306, G404,G703 ` exited with
270- status 0 in ` src/go ` , ` tests/fixtures/go ` , and ` bench/drivers/go ` .
303+ - Local gosec with only ` -exclude=G404 ` exited with status 0 in ` src/go ` ,
304+ ` tests/fixtures/go ` , and ` bench/drivers/go ` .
271305- ` git diff --check ` passed.
272306
273307Real-use evidence:
@@ -342,24 +376,23 @@ Lessons:
342376
343377Follow-up mapping:
344378
345- - No deferred item remains. Current result-bearing rules were either removed
346- from the active scanner set or kept with zero local findings. Re-enabling
347- removed broad rules would be a new cleanup/hardening SOW, not unfinished work
348- in this SOW .
379+ - No deferred item remains. Approved hygiene rules were restored and cleaned.
380+ Remaining disabled broad debt rules were outside the approved restoration set
381+ and would require a new cleanup/hardening SOW before they can be enabled as
382+ hard gates .
349383
350384## Outcome
351385
352386Completed.
353387
354- - Codacy local analysis now runs 7 enabled tools and 2,727 enabled patterns
355- with zero findings.
388+ - Codacy local analysis now runs 6 enabled tools and 2,706 enabled patterns
389+ with zero findings and zero tool errors .
356390- Codacy Cloud accepted the tuned config import: 4 tools disabled, 7 tools
357391 reconfigured, and repository reanalysis requested.
358- - GitHub Code Scanning producers were tuned so current result-bearing rules are
359- removed from active upload paths instead of hidden in GitHub only.
360- - Go staticcheck annotations from the previous commit were fixed by preserving
361- overflow checks in lookup offset calculations and removing an unused POSIX
362- UDS helper.
392+ - GitHub Code Scanning producers were tuned so approved gosec and CodeQL
393+ hygiene rules are active again instead of hidden in GitHub only.
394+ - Go scanner findings from the restored rules were fixed or narrowly
395+ suppressed with justification.
363396- No protocol behavior, public docs, or public integration skills changed.
364397
365398## Lessons Extracted
@@ -372,7 +405,7 @@ Completed.
372405
373406## Followup
374407
375- None yet .
408+ None.
376409
377410## Regression Log
378411
@@ -484,3 +517,100 @@ Artifact updates:
484517- Specs: no protocol/API behavior changed.
485518- Runtime project skills: no project runtime skill update was needed.
486519- End-user/operator docs and skills: no public SDK workflow changed.
520+
521+ ## Regression - 2026-06-03 Hygiene Check Restoration
522+
523+ What broke:
524+
525+ - The previous zero-finding baseline intentionally weakened useful hygiene
526+ checks. The user accepted the recommendation to restore them so scanner
527+ cleanliness does not come from disabling valuable checks.
528+
529+ Evidence:
530+
531+ - ` staticcheck ` is still configured with ` continue-on-error: true ` in
532+ ` .github/workflows/static-analysis.yml ` , so it annotates but does not hard
533+ fail.
534+ - ` .github/workflows/codacy-analysis.yml ` records the Codacy Analysis CLI
535+ status but the reporting step does not fail on non-zero status.
536+ - ` .github/codeql.yml ` excludes hygiene/security query IDs that should be
537+ restored for this SDK: ` cpp/constant-comparison ` ,
538+ ` cpp/toctou-race-condition ` , ` cpp/unused-local-variable ` ,
539+ ` cpp/unused-static-function ` , ` go/incorrect-integer-conversion ` ,
540+ ` go/unhandled-writable-file-close ` , and ` go/useless-assignment-to-local ` .
541+ - ` .github/workflows/static-analysis.yml ` excludes gosec rules that should be
542+ restored or path-scoped: ` G103 ` , ` G104 ` , ` G115 ` , ` G304 ` , ` G306 ` , and ` G703 ` .
543+ - Official CodeQL documentation confirms query suite filters remove or keep
544+ queries by stable query metadata such as ` id ` .
545+ - Staticcheck documentation identifies the ` SA ` checks as correctness checks.
546+ - gosec documents the relevant rule IDs as security checks for unsafe use,
547+ unchecked errors, integer conversion, file path/path traversal, and file
548+ permissions.
549+
550+ Why previous validation missed it:
551+
552+ - The prior cleanup optimized for a zero-current-finding baseline after a large
553+ scanner rollout. That was useful to stop existing debt from blocking every
554+ change, but it left valuable hygiene rules weaker than the project should
555+ keep long term.
556+
557+ Repair plan:
558+
559+ - Make ` staticcheck ` a hard gate.
560+ - Make Codacy Local Analysis fail the workflow when the CLI reports findings.
561+ - Restore the selected CodeQL query IDs listed above.
562+ - Restore gosec ` G104 ` , ` G115 ` , and ` G306 ` globally.
563+ - Restore or path-scope gosec ` G103 ` , ` G304 ` , and ` G703 ` ; production code should
564+ be scanned, while intentional fixture/test patterns may receive narrow
565+ suppressions with justification.
566+ - Run restored checks locally, then fix true positives or add narrow justified
567+ suppressions where the pattern is intentional and test-only.
568+
569+ Validation:
570+
571+ - ` cd src/go && go test ./... ` passed.
572+ - ` cd tests/fixtures/go && go test ./... ` passed.
573+ - ` cd bench/drivers/go && go test ./... ` passed.
574+ - ` cd src/go && go vet ./... && "$(go env GOPATH)/bin/govulncheck" ./... `
575+ passed with no vulnerabilities found.
576+ - ` cd tests/fixtures/go && go vet ./... && "$(go env GOPATH)/bin/govulncheck" ./... `
577+ passed with no vulnerabilities found.
578+ - ` cd bench/drivers/go && go vet ./... && "$(go env GOPATH)/bin/govulncheck" ./... `
579+ passed with no vulnerabilities found.
580+ - ` cd src/go && "$(go env GOPATH)/bin/staticcheck" ./... ` passed.
581+ - ` cd tests/fixtures/go && "$(go env GOPATH)/bin/staticcheck" ./... `
582+ passed.
583+ - ` cd bench/drivers/go && "$(go env GOPATH)/bin/staticcheck" ./... `
584+ passed.
585+ - ` actionlint ` passed.
586+ - ` cd src/go && "$(go env GOPATH)/bin/gosec" -quiet -fmt json -out /tmp/plugin-ipc-gosec-src-go-after.json -exclude=G404 ./... `
587+ exited 0 and produced no findings.
588+ - ` cd tests/fixtures/go && "$(go env GOPATH)/bin/gosec" -quiet -fmt json -out /tmp/plugin-ipc-gosec-fixtures-go-after.json -exclude=G404 ./... `
589+ exited 0 and produced no findings.
590+ - ` cd bench/drivers/go && "$(go env GOPATH)/bin/gosec" -quiet -fmt json -out /tmp/plugin-ipc-gosec-bench-go-after.json -exclude=G404 ./... `
591+ exited 0 and produced no findings.
592+ - ` codacy-analysis analyze . --install-dependencies --output-format json --output /tmp/plugin-ipc-codacy.json --parallel-tools 2 --tool-timeout 900000 `
593+ exited 0 with 0 issues and 0 tool errors across 6 tools: Checkov,
594+ Semgrep/Opengrep, Trivy, cppcheck, ShellCheck, and Spectral.
595+ - ` codacy-analysis analyze . --install-dependencies --output-format sarif --output /tmp/plugin-ipc-codacy.sarif --parallel-tools 2 --tool-timeout 900000 `
596+ exited 0 and generated SARIF with 0 results.
597+ - ` make ` passed and rebuilt the changed C SHM source plus Go benchmark binary.
598+ - ` /usr/bin/ctest --test-dir build --output-on-failure ` passed all 46 tests.
599+ The default ` ctest ` command on this workstation resolves to a broken
600+ Python wrapper at ` ~/.local/bin/ctest ` ; the system CTest binary was used
601+ directly.
602+
603+ Artifact updates:
604+
605+ - AGENTS.md: no update needed; existing project scanner and validation commands
606+ remain accurate.
607+ - Runtime project skills: no update needed; there are still no runtime
608+ project-specific skills and no reusable workflow was missing from AGENTS.md.
609+ - Specs: no protocol/API behavior changed. The production C format string still
610+ writes the same 16-character lowercase hexadecimal session ID.
611+ - End-user/operator docs: no update needed; no public SDK behavior or operator
612+ workflow changed.
613+ - End-user/operator skills: ` docs/netipc-integrator-skill.md ` is unaffected
614+ because public integration guidance did not change.
615+ - SOW lifecycle: this reopened regression is completed and the SOW will be
616+ moved back to ` done/ ` in the same commit as the restored scanner changes.
0 commit comments