Repository navigation
fix(security): resolve the open Semgrep code-scanning alerts in the release workflows and the unwrap check - #804
Conversation
…elease workflows and the unwrap check
⚪ Performance A/B: no change beyond noise65 shape×range — 65 ⚪ same · results vs Loki: 51 same, 0 new difference(s), 14 pre-existing Every shape is within noise of the base build (±30% and 100 ms). 65 unchanged shape×range (within noise)
Cold (first-run) timings — what a user opening a panel sees
↺ Loki cold taken from the first set that ran the same query; Loki's cache answered this one. Why these shapes
base |
✅ Visual smoke: passed with warningsBase
Gate: a base-vs-PR data difference passes when the PR is closer to Loki, and fails when the PR diverges from Loki or Loki cannot decide it (at a range Loki does not hold, a difference passes when the same page proved it closer to Loki at a shorter range; otherwise label the pull request dd-fields-1h: history-dependent difference, not gated (1): resource /api/datasources/uid/*/resources/patterns?end=2026-10-22T05%3A49%3
dd-service-logs-1h: history-dependent difference, not gated (1): resource /api/datasources/uid/*/resources/patterns?end=2026-10-22T05%3A49%3
All montages of this run: |
PR Quality ReportCompared against base branch Coverage and tests
Compatibility
Performance smokeLower CPU cost (
State
|





Summary
This resolves the six open Semgrep code-scanning alerts on
main(626–631) by changing the code, not by dismissing the alerts.unsafe-add-mask-workflow-command: five steps inauto-release.yaml,perf-daily.yamlandrelease.yamlbuilt a base64Authorizationheader from a token and hid it with::add-mask::. A step that stops workflow command processing defeats that mask.trailofbits.go.iterate-over-empty-map: the same finding as alert 607. fix(security): mark the parseJSON-filled extracted map as a reviewed Semgrep false positive #788 marked it with an in-sourcenosemgrepcomment and the alert was dismissed. Semgrep does emit that result withsuppressions: [{kind: inSource}], but GitHub code scanning opened it again as a new alert when the line's fingerprint changed.| jsonextracted intoparsedis nowmaps.Copy(parsed, extracted).parseJSONwrites onlytruevalues intoextracted.Changes
.github/workflows/auto-release.yaml: the re-read fetch and the tag-pushgit_asuse the credential helper..github/workflows/perf-daily.yaml: the history fetch and the report-branch push use the credential helper..github/workflows/release.yaml: the metadata-branchgit_asuses the credential helper.# shellcheck disable=SC2016. The single quotes are intentional: git expandsGIT_AUTH_TOKENwhen it runs the helper.internal/proxy/unwrap_conversion_error.go:maps.Copyreplaces the loop, and thenosemgrepmarker is removed.internal/proxy/unwrap_conversion_error_test.go: a new test,TestUnwrapParseLineJSONNamesStayParsedForLaterStages, covers a| jsonstage followed by a| regexpstage that captures the same name._extractedduplicate is added.level_extracted:levelappears), so the line is now pinned.CHANGELOG.md: two Security entries under[Unreleased].Proofs
mainthe same run reports the add-mask findings, plus the map finding markedinSource.release.yamlandauto-release.yamlgit_as: a token-authenticatedls-remoteof a private repository works, the same call with an empty token fails with "Authentication failed", andpush --dry-runauthenticates.perf-daily.yamlinline fetch and push, and theauto-release.yamlre-read fetch: they authenticate the same way.gofmt,go vet ./internal/proxy/, the 7 unwrap conversion tests plus the new one, and the same set with-race, all pass.scripts/ci/tests(77 tests), the conformance gate and the changelog gate pass.Not applicable: the Go change is a refactor with no behaviour change, covered by the new test. The rest is CI. So e2e vs Loki, the Grafana range matrix, visual proof, A/B, benchstat and the load test do not apply.
Release note: the release this PR's merge cuts is the first to push its tag through the credential helper. If that step fails, no tag is created and
[Unreleased]stays intact; a.github/-only revert does not cut a release.