Skip to content

ci(publish): narrow workflow-level permissions to contents: read - #305

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-304
Oct 19, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
scanner/fix-304

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #304

Narrow the workflow-level permissions block to contents: read only, as the id-token: write permission is only required by the publish job, which already declares it in its job-level permissions. This reduces the attack surface by ensuring other jobs like verify-tag do not receive unnecessary OIDC-capable tokens.

All jobs retain their required permissions:

  • verify-tag: Uses workflow-level contents: read
  • publish: Uses job-level contents: read and id-token: write
  • release: Uses job-level contents: write

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 19, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Oct 19, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
dfe95eb

ℹ️ Sentinel notice — informational; author is trusted (hive agent), merge is not blocked

Hive flagged this PR (author @hivecommons-hive[bot], head dfe95eb87968) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/publish.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me; routing to a maintainer because it edits workflow permissions.

Verified at head dfe95eb in .github/workflows/publish.yml:

  • Workflow-level block (lines 9–10) is now contents: read only; id-token: write removed.
  • publish job (lines 50–52) still declares contents: read + id-token: write at job level, so npm provenance/OIDC publishing is unaffected.
  • release job (lines 99–100) keeps contents: write for creating the GitHub release.
  • verify-tag (line 13) declares no job-level block and inherits contents: read — it only checks out and inspects the tag, so that is sufficient.

Net effect: verify-tag loses an OIDC-capable token it never used. No job loses a permission it needs. Author is the hive App bot; the change is a strict tightening.

Workflow permissions: is a trust surface, so I'm not calling this settled on my own.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 19, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @dfe95eb
  • reviewer question: @clubanderson please confirm the publish workflow permissions narrowing (id-token: write moved from workflow-level to publish job only) is acceptable to merge.
  • the automerge lane will not merge this unattended

Head: verdict requires_human @dfe95eb, 7/7 checks green, DCO yes, soak 0s of 30m0s.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge or the merge queue on its own.

@clubanderson clubanderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed — narrowing workflow-level permissions to contents: read is acceptable; publish job retains job-level id-token: write with environment npm, so OIDC publishing is unaffected.

@clubanderson

Copy link
Copy Markdown
Member

/hive decision Confirmed — narrowing workflow-level permissions to contents: read is acceptable; publish job retains job-level id-token: write with environment npm, so OIDC publishing is unaffected. Merge.

/lgtm
/approve

@kubestellar-prow kubestellar-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 19, 2026
@kubestellar-prow

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 63f07436ada84fc218c8704fd4ffe076afd58cc6

1 similar comment
@kubestellar-prow

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: 63f07436ada84fc218c8704fd4ffe076afd58cc6

@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: clubanderson

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hivecommons-hive
hivecommons-hive Bot merged commit 6da3f9c into main Oct 19, 2026
12 of 13 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-304 branch October 19, 2026 20:21
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#305dfe95eb` sha256:08f3f2435d7513bb18d32e30d7357d877384fb2a6fe29806758bd4c4229dea1f — download from the dashboard or `hivectl review evidence #305`.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review backlog (security): Workflow-level id-token: write still granted to all jobs

1 participant