Skip to content

Harden dependency review checks across PR types - #224

Merged
lelia merged 5 commits into
mainfrom
lelia/dependabot-pr-merge-fix
Jun 3, 2026
Merged

lelia merged 5 commits into
mainfrom
lelia/dependabot-pr-merge-fix

Conversation

@lelia

@lelia lelia commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two related fixes to make the hardened dependency-review / e2e CI work correctly as required checks across Dependabot, fork, and maintainer PRs — without leaving any class of PR permanently stuck.

1. Report e2e-* checks on fork and Dependabot PRs (e2e-test.yml)

The e2e job is skipped on PRs that lack repository secrets (forks and Dependabot). Because it's skipped via a job-level if, its matrix never expands, so the e2e-* check contexts are never created and required checks wait on them indefinitely (Expected — Waiting for status to be reported), permanently blocking merge.

Adds an e2e-bypass job whose if is the exact negation of the e2e job's run condition. It emits the same e2e-* check names (scan, sarif, reachability, gitlab, json, pypi) with a passing status for fork/Dependabot PRs. The two jobs are mutually exclusive and exhaustive: every PR runs exactly one, never both, never neither. Push and workflow_dispatch continue to run the real suite.

2. Add dependency-review-gate aggregator check (dependency-review.yml)

The Socket Firewall enterprise smoke job is the most meaningful supply-chain check for maintainer-added dependencies, but it can't be marked required directly: it's conditional (per-manifest, and free-vs-enterprise per author), so on most PRs it's legitimately skipped — and a required-but-skipped check hits the same "waiting forever" trap.

Adds a dependency-review-gate job that always runs (if: always()) and collapses every smoke job into one pass/fail signal: it fails iff any job that ran ended in failure/cancelled; success and skipped both pass. This is the single check intended to be required later — it satisfies Dependabot/fork PRs (Firewall-free) and maintainer PRs (Firewall-enterprise) alike, and turns a Socket Firewall block into a merge-blocking failure instead of a non-required job nobody is forced to run.

Scaffolding only: the gate is not yet added to branch protection's required checks — that's deferred until it's merged to main and observed reporting (otherwise other open PRs would get stuck on it).


Also in this PR: release 2.4.5 (bundled)

Cutting the release from this branch, so it also carries:

  • CLI 2.4.5 (pyproject.toml, socketsecurity/__init__.py)
  • socketdev>=3.2.1 (was >=3.2.0 from Bump required SDK version to >=3.2.0 #222 / v2.4.4); uv.lock regenerated to the published 3.2.1
  • Brief CHANGELOG.md 2.4.5 entry

No CLI logic changes in the bump.

The e2e job is skipped on PRs that can't access repository secrets
(forks and Dependabot). Because it's skipped via a job-level `if`, its
matrix never expands, so the required e2e-* check contexts are never
created and branch protection waits on them indefinitely, blocking merge.

Add an e2e-bypass job whose `if` is the exact negation of the e2e job's
run condition. It emits the same e2e-* check names with a passing status
for fork/Dependabot PRs, satisfying branch protection without running the
real tests. The two jobs are mutually exclusive and exhaustive: every PR
runs exactly one.

Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
@lelia
lelia requested a review from a team as a code owner June 3, 2026 03:06
@github-actions

github-actions Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

🚀 Preview package published!

Install with:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketsecurity==2.4.5.dev1

Docker image: socketdev/cli:pr-224

@lelia lelia changed the title ci: report e2e-* checks on fork and Dependabot PRs Report e2e-* checks on fork + Dependabot PRs Jun 3, 2026
@lelia lelia added bug Something isn't working dependencies Pull requests that update a dependency file labels Jun 3, 2026
lelia added 2 commits June 3, 2026 13:26
The Socket Firewall enterprise smoke job is the most meaningful supply-chain
check for maintainer-added dependencies, but it can't be required directly:
it's conditional (per-manifest, and free-vs-enterprise per author), so on most
PRs it's legitimately skipped -- and a required check whose job is skipped sits
at "Expected -- Waiting for status" forever, blocking merge (the same trap
that stranded Dependabot PRs on the e2e-* checks).

Add a dependency-review-gate job that always runs and collapses every smoke
job into one pass/fail signal: it fails iff any job that ran ended in failure
or was cancelled; success and skipped both pass. This is the single check
intended to be marked required later -- it satisfies Dependabot/fork PRs (which
run Firewall-free) and maintainer PRs (Firewall-enterprise) alike, and turns a
Socket Firewall BLOCK into a merge-blocking failure instead of a non-required
job nobody is forced to run.

Scaffolding only: the gate is not yet added to branch protection's required
checks (deferred until it's merged to main and observed reporting).

Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
@lelia lelia changed the title Report e2e-* checks on fork + Dependabot PRs ci: harden dependency-review required checks for Dependabot/fork/maintainer PRs Jun 3, 2026
@lelia lelia changed the title ci: harden dependency-review required checks for Dependabot/fork/maintainer PRs Harden dependency review checks across PR types Jun 3, 2026
lelia added 2 commits June 3, 2026 14:11
Follows the 2.4.4 release (SDK >=3.2.0) by picking up socketdev 3.2.1.
Regenerates uv.lock to the published 3.2.1 release; no CLI logic changes.

Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​socketdev@​3.2.0 ⏵ 3.2.198100100100100

View full report

@lelia
lelia temporarily deployed to socket-firewall June 3, 2026 18:13 — with GitHub Actions Inactive
@socket-security-staging

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​socketdev@​3.2.0 ⏵ 3.2.198100100100100

View full report

@lelia
lelia merged commit 62beff1 into main Jun 3, 2026
31 of 33 checks passed

This branch was previously deployed

1 inactive deployment
socket-firewall — 9449d140 Deployed Jun 3, 2026 by lelia via python-sfw-smoke-enterprise #47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants