Skip to content

feat(core): add the DeclareSecrets rule - #86

Open
runewright[bot] wants to merge 5 commits into
mainfrom
change/declare-secrets-per-repository
Open

runewright[bot] wants to merge 5 commits into
mainfrom
change/declare-secrets-per-repository

Conversation

@runewright

@runewright runewright Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Draft for change/declare-secrets-per-repository: the session agent fills this body before rune sign open.

Plan

Why this shape, one or two sentences.

Changes

  • Fill in: verb-first, file-anchored claims the diff upholds.

Testing

  • Fill in: the command run and its outcome.

Release Notes

  • N/A

Note

Add the DeclareSecrets rule to core runes and the delivery cast

  • Adds DeclareSecrets.md, a rule that instructs agents to declare repository secrets in the root secretspec.toml with purpose descriptions, read them via SecretSpec, and pass values through stdin rather than conversation text or process arguments. It also covers machine credentials via the provision manifest and account-specific profile.
  • Registers the rule in the delivery cast selection in delivery.yaml.
  • Updates comments in secretspec.toml to show a SecretSpec run invocation with a reason.
  • Adds the proposal, spec, task list, and PR docs under docs/changes/declare-secrets-per-repository.
  • Risk: agents loading the delivery cast will now follow the DeclareSecrets rule; check casts/delivery.yaml rune selection for unintended runtime rule additions.

Macroscope summarized 2e2f2c6.

The stack declares secrets with secretspec now: each repository from the
skeleton has a secretspec.toml, rune launch reads its credentials through
~/.config/rune/secretspec.toml, and provision stores new keys in the
Keychain. The rule tells an agent to declare each secret with a
description, read it only through secretspec, keep values out of the
conversation and off argv, and give every call a reason. The delivery
cast selects it.

Change declare-secrets-per-repository.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@github-actions github-actions Bot added size:med auto: changed-lines bucket area:docs auto: documentation and markdown labels Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

review/correctness stood down on 85a2d460: free lanes only: deterministic check quality is pending on this head. Apply review:runeseer to force a paid round.

…sitory

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

review/correctness stood down on 02ebb4df: free lanes only: deterministic check quality is pending on this head. Apply review:runeseer to force a paid round.

Claude Opus 5.5 (claude-opus-5-5) and others added 2 commits November 24, 2026 01:09
Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
The rule names ~/.config/provision/secretspec.toml, which runedeck/provision
publishes, as the declaration of the machine credentials, with one profile
for each account. A repository reads such a credential from that manifest and
does not declare it again. The rule also limits `secretspec get` to a pipe or
a command substitution, and keeps the error text of secretspec out of the
transcript, because a parse error quotes the value.

Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@runeseer

runeseer Bot commented Nov 24, 2026

Copy link
Copy Markdown

review/correctness round 1 started on bfe8fc2b at ledger generation 1.

@runeseer

runeseer Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Claude finished @N4M3Z's task in 2m 42s —— View job


Correctness review

Request changes. The rule's only worked example is the bare secretspec get call the rule itself forbids, so an agent that copies it prints the credential into the transcript.

  • Read the lane inputs and the ledger
  • Review origin/main...HEAD
  • Verify the proposal's claims against the repository
  • Write the verdict, findings, and summary files

High — runes/core/rules/DeclareSecrets.md:9 gives secretspec get <NAME> --file ~/.config/provision/secretspec.toml --profile owner --reason "<why>" as the example. It feeds no pipe and no command substitution, which line 3 of the same file names as the case that prints the value into the transcript. The spec delta requires that no credential value appear in the transcript. Fix this →

Medium — runes/core/rules/DeclareSecrets.md:7 mandates --reason on every call and states SecretSpec refuses a call that gives none. No other file in the repository passes that flag, and secretspec.toml:3 documents reads as secretspec run -- <command> or secretspec get <NAME>. Fix this →

Verified as upheld: casts/core.yaml does select the rule through core/**, and the new rule file carries no frontmatter, matching every other file in runes/core/rules/.
· branch change/declare-secrets-per-repository

@runeseer

runeseer Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Runeseer review — clean

Looks good. The head is unchanged from the last review, both earlier credential-handling issues stay fixed, and no reviewer raised a new defect.

  • The new rule reaches core sessions through casts/core.yaml's core/** glob and delivery sessions through its explicit entry, so registration has no gap.
  • Macroscope marked the pull request as needing human approval on eligibility alone; that approval is the owner's call.

No open findings · Reviewed 2e2f2c60 · review run · $0.55 · 0m58s · 20 turns

The example for the provision manifest was a bare `secretspec get`, the
call the same rule forbids because it prints the value into the
transcript. It is now a `secretspec run` call. The reason sentence names
what secretspec 0.21.1 does: by default it refuses an agent session
without --reason, and only a provider that keeps an audit log records the
reason. The comment in secretspec.toml shows the read with a reason.

Resolves-Thread: #86 (comment)
Resolves-Thread: #86 (comment)
Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
@runeseer

runeseer Bot commented Nov 24, 2026

Copy link
Copy Markdown

review/correctness round 2 started on 2e2f2c60 at ledger generation 1.

@N4M3Z
N4M3Z marked this pull request as ready for review November 24, 2026 00:31
@N4M3Z
N4M3Z self-requested a review as a code owner November 24, 2026 00:31
@runeseer

runeseer Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Claude finished @N4M3Z's task in 1m 21s —— View job


Correctness review

Looks good. Both findings from the previous round are fixed at 2e2f2c60.

  • Read the lane inputs and the ledger
  • Review bfe8fc2b...HEAD
  • Recheck both open ledger findings against HEAD
  • Write the verdict, findings, and summary files

runes/core/rules/DeclareSecrets.md:9 — fixed. The provision example now reads the credential under secretspec run --file ~/.config/provision/secretspec.toml --profile owner --reason "<why>" -- <command>. The rule no longer demonstrates a bare secretspec get whose output nothing consumes, so no worked example prints a value into the transcript.

runes/core/rules/DeclareSecrets.md:7 — fixed. secretspec.toml:4 now documents reads as secretspec run --reason "<why>" -- <command> and states that an agent session must give a reason, so the repository's declared interface defines the flag the rule mandates. Line 7 also softens the two claims to "By default SecretSpec refuses" and "a provider that keeps an audit log".

Minor, non-blocking: the comment line at secretspec.toml:5 runs past the wrap the rest of that block keeps.
· branch change/declare-secrets-per-repository

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T00:32:21.769165Z 2e2f2c6 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-24T00:36:36.963514Z 2e2f2c6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@macroscopeapp

macroscopeapp Bot commented Nov 24, 2026

Copy link
Copy Markdown

Approvability

Verdict: Needs Human Approval

Macroscope's review found this PR requires human approval — The new rule standardizes credential handling across core and delivery sessions. Unresolved review concerns about transcript disclosure and SecretSpec command compatibility need reconciliation with the current revision before agents rely on these instructions.

Notes:

  • Macroscope's correctness review did not run, so approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

runeseer[bot]
runeseer Bot previously approved these changes Nov 24, 2026

@runeseer runeseer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Earned approval: review/correctness returned a clean verdict for 2e2f2c6 at ledger generation 1. Dismissed automatically on any new push or generation.

@github-actions
github-actions Bot dismissed runeseer[bot]’s stale review November 24, 2026 00:33

The pull request body changed after the verdict; the approval is stale.

@N4M3Z N4M3Z added the review:runeseer Summons the adjudicating correctness lane label Nov 24, 2026
@runeseer

runeseer Bot commented Nov 24, 2026

Copy link
Copy Markdown

review/correctness round 3 started on 2e2f2c60 at ledger generation 2.

@github-actions github-actions Bot removed the review:runeseer Summons the adjudicating correctness lane label Nov 24, 2026

@runeseer runeseer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Earned approval: review/correctness returned a clean verdict for 2e2f2c6 at ledger generation 2. Dismissed automatically on any new push or generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs auto: documentation and markdown size:med auto: changed-lines bucket

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant