Skip to content

Generate the Probe Value in the Step and Publish Only Its Digest - #1458

Merged
ptr727 merged 2 commits into
developfrom
feature/probe-hashed-nonce
Sep 9, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/probe-hashed-nonce

Conversation

@ptr727

@ptr727 ptr727 commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Continues the measurement for #1321, and replaces the approach the previous round disproved.

What the last run established

A Copilot review ran with a setup step reading secrets.PROBE_NONCE and failed, with the step's own
message: the value was empty or absent. A Copilot code review setup environment receives no
repository secret.
That is worth recording on its own, since it bounds what such a step can ever
be handed, and it is why the message was made self-identifying in the first place.

The same run is also the negative control the measurement had been missing. No files were written,
because the step failed before writing any, and the review reported both slots absent. A reviewer
constructing an answer from its own environment would have produced digits.

What changes

The value is generated inside the step from /dev/urandom rather than configured. It is in no tree,
in no environment variable a review holds, and in no repository setting. Only its SHA-256 is printed,
and the value cannot be recovered from that, so the log is useless to a reviewer while remaining
sufficient to check an answer: hash what the review reports and compare it to the logged digest.

This is the first version of the probe where a correct answer has no source other than the file
itself. A repository secret was derivable by nobody but turned out to be unavailable, and a run id
was available to everybody.

The generator reads a bounded number of bytes rather than piping from an unbounded reader, and the
length is checked before use, so a short read fails the step instead of writing a weak value.

What this obliges

Unchanged. The workflow is temporary, it is reverted once #1321 has its answer, and the
now-unused PROBE_NONCE repository secret is deleted with it.

The secret approach is dead, and the run that killed it is the evidence: a Copilot review whose
setup step read `secrets.PROBE_NONCE` failed with the step's own message saying the value was empty
or absent, so that environment receives no repository secret. That is worth knowing independently
of this measurement, since it bounds what a setup step can ever be given.

The value is now generated inside the step from `/dev/urandom`, so it is in no tree, in no
environment variable a review holds, and in no repository setting. Only its SHA-256 is printed, and
the value is not recoverable from that, so the log stays useless to a reviewer while remaining
sufficient to check an answer: hash what the review reports and compare.

This is the first version where a correct answer has no source other than the file. A repository
secret was derivable by nobody but unavailable, and a run id was available to everybody.

The generator is bounded rather than piped from an unbounded reader, and the length is checked
before use, so a short read fails the step instead of writing a weak value. Verified over repeated
runs under `bash --noprofile --norc -eo pipefail`, each producing twenty-four decimal digits and a
distinct digest.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 9, 2026 00:00
@coderabbitai

coderabbitai Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 277f32d7-27b1-4989-a25e-9928f8ee16fd


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The workflow logs a digest labeled as the token digest but currently hashes only the nonce, which breaks the stated verification method.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the Copilot code review probe workflow to generate the probe value inside the setup step (instead of reading a repository secret) and to publish only a SHA-256 digest to the logs for later verification.

Changes:

  • Generate a nonce from /dev/urandom inside the step instead of using secrets.PROBE_NONCE.
  • Log a SHA-256 digest intended to let maintainers verify any reported probe value without publishing it.
File summaries
File Description
.github/workflows/copilot-code-review.yml Generates the probe value in-step and logs a digest while continuing to write the probe token to the measured locations.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Write probe token step

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

Review raised that the log said token digest while the digest is computed over the nonce, and the
token carries a fixed prefix in front of it. Hashing the nonce is the right choice, since the reader
is asked for the digits alone and the prefix is public either way, so the label is what was wrong
rather than the value.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 9, 2026 00:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The workflow change is self-contained, aligns with the stated measurement goals, and preserves the existing workflow/YAML conventions and safety properties (no secret/token value printed).

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Write probe token step

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

@ptr727
ptr727 merged commit 90d92ff into develop Sep 9, 2026
9 of 10 checks passed
@ptr727
ptr727 deleted the feature/probe-hashed-nonce branch September 9, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants