Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# Default owner for everything not matched by a more specific rule.
* @WomB0ComB0
#
# Two owners, deliberately. GitHub will not let an author approve their own
# pull request, so a sole owner who is also the only person opening pull
# requests makes `require_code_owner_review` impossible to satisfy rather than
# strict: every pull request stays blocked with nothing left to do. The second
# owner is what makes the rule enforceable instead of deadlocked.
#
# Multiple owners for one pattern must share a single line; consecutive lines
# do not stack, the last matching line wins.
* @WomB0ComB0 @resq-sw
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
61 changes: 60 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,80 @@ jobs:
run-deny: false
run-coverage: false

# ── Private-name guard ──────────────────────────────────────────────
# Called from here and not from security.yml: `needs:` cannot reach across
# workflow files, and the org ruleset watches only the `required` context.
# A guard that reports into nothing cannot stop a merge, however loudly it
# fails.
private-name-guard:
name: private-name-guard
# Dependabot's restricted context resolves Actions secrets to empty, so
# the guard cannot authenticate on its pull requests. The aggregate below
# tolerates the resulting skip, but only on a pull request Dependabot
# actually opened.
#
# Both halves are tested, because github.actor does not mean "the author".
# It names the account that triggered the run; on a re-run it stays as the
# initial triggerer while github.triggering_actor names whoever pressed
# the button. Nothing in it is pinned to who opened the pull request,
# which is what this decision is actually about -- and zizmor's
# bot-conditions audit flags comparing it against a bot name for that
# reason. user.login on the pull_request payload IS the author, fixed at
# trigger time, so the pair of them is what decides.
if: >-
${{ github.actor != 'dependabot[bot]'
|| github.event.pull_request.user.login != 'dependabot[bot]' }}
uses: resq-software/.github/.github/workflows/private-name-guard.yml@03bd2fc8788be394d96edebcaceb3b3735bb2cbc # main
secrets:
PRIVATE_NAME_GUARD_TOKEN: ${{ secrets.PRIVATE_NAME_GUARD_TOKEN }}

required:
name: required
runs-on: ubuntu-latest
needs: [rust]
needs: [rust, private-name-guard]
if: always()
steps:
- name: Aggregate
env:
RUST_RESULT: ${{ needs.rust.result }}
GUARD: ${{ needs.private-name-guard.result }}
ACTOR: ${{ github.actor }}
AUTHOR: ${{ github.event.pull_request.user.login }}
run: |
set -eu
case "$RUST_RESULT" in
success|skipped|"") echo "ok: rust=$RUST_RESULT" ;;
*) echo "::error::rust reusable returned: $RUST_RESULT"; exit 1 ;;
esac
# The guard is strict: a SKIPPED guard means no check ran, which is
# also the fork case -- a fork cannot reach PRIVATE_NAME_GUARD_TOKEN,
# so it fails closed and needs a maintainer to re-run from a branch
# here. This aggregate is the only context the org ruleset watches,
# so anything tolerated here is tolerated at merge.
#
# A Dependabot pull request is the single allowed skip, for the
# reason given on the guard job. Tolerating it takes BOTH the
# triggering account and the pull request's author, because
# github.actor alone says who started the run and never says who
# opened the pull request (zizmor bot-conditions).
#
# github.triggering_actor is deliberately NOT in the test. A human
# re-run of a Dependabot run still executes with github.actor's
# privileges, so the Dependabot secret store is still what the
# guard would read from and it still cannot authenticate: adding
# that check would turn every re-run of a Dependabot pull request
# red without scanning anything. The skip disappears for real once
# a Dependabot-scoped token exists -- see resq-software/.github#92.
if [ "$GUARD" = "success" ]; then
echo "ok: private-name-guard=success"
elif [ "$GUARD" = "skipped" ] \
&& [ "$ACTOR" = "dependabot[bot]" ] \
&& [ "$AUTHOR" = "dependabot[bot]" ]; then
echo "ok: private-name-guard skipped on a Dependabot pull request"
else
echo "::error::private-name-guard returned: $GUARD"
exit 1
fi

# Publish a GitHub Release per v* tag so the org's changelog
# aggregator picks the version up — the aggregator ingests GitHub *Releases*,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# startup-fails for Dependabot's restricted context, which blocks Dependabot's own security
# PRs. Dependabot already vetted the bump; push/schedule still scan the default branch.
if: ${{ github.actor != 'dependabot[bot]' }}
uses: resq-software/.github/.github/workflows/security-scan.yml@73b9edb8f4f28a99f70ee22eb5e2dd2bf7807c84 # main (2026-06-01, #21)
uses: resq-software/.github/.github/workflows/security-scan.yml@9b8f49927aa789aef1a99e5afc4c1e2278b2dfc0 # main (2026-06-01, #21)
with:
languages: '["actions"]'
enable-semgrep: true
Expand Down
Loading
Loading