Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): cancel superseded security scans (#127936)

posthog[bot]ef5239b13bf9
diff --git a/.github/workflows/ci-security.yaml b/.github/workflows/ci-security.yaml
index 2b00dbd7a0b4..de1326bbfcaf 100644
--- a/.github/workflows/ci-security.yaml
+++ b/.github/workflows/ci-security.yaml
@@ -6,6 +6,12 @@ on:
name: Security
+concurrency:
+ # Push runs key by SHA. A shared group keeps one pending run, so intermediate master commits would lose their scan.
+ # PR runs key by github.ref (refs/pull/<N>/merge), not head_ref, so fork PRs on the same branch name stay apart.
+ group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.sha || github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
permissions:
contents: read
diff --git a/tools/hogli-commands/hogli_commands/workflow_lint/checks/pr_concurrency.py b/tools/hogli-commands/hogli_commands/workflow_lint/checks/pr_concurrency.py
index 146187b429e9..b5b6ef2e4a37 100644
--- a/tools/hogli-commands/hogli_commands/workflow_lint/checks/pr_concurrency.py
+++ b/tools/hogli-commands/hogli_commands/workflow_lint/checks/pr_concurrency.py
@@ -54,8 +54,6 @@ class PrConcurrencyCheck(WorkflowCheck):
"ci-backend-update-test-timing.yml",
# Migration enforcement; arguably wants to complete on every PR state.
"ci-migrations-service-separation-check.yml",
- # Shared concurrency group on master causes intermediate runs to be cancelled.
- "ci-security.yaml",
}
)