Skip to content

test(security): the security and crypto tests run on the process, clock and GitHub fakes, and the scan gate, the lease revoke and git signing leave commands - #2573

Merged
dan-petty merged 2 commits into
mainfrom
test/2543-security-process-fakes
Oct 29, 2026
Merged

dan-petty merged 2 commits into
mainfrom
test/2543-security-process-fakes

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The security and crypto tests of #1332's files no longer patch a process-layer, clock, settings or github.ssh name, and three pieces of logic leave commands/.

Logic that leaves commands/ (the commands print the same lines and exit with the same status):

  • gate_report in src/devops_cli/security/pipeline.py gives the --fail-on verdict of a scan report as a GateVerdict: the scanners that failed, the named scanners that did not run, and whether a gating finding is at or above the threshold. devops scan report prints the errors and exits. _evaluate_fail_on, _check_failed_scanners and _check_explicit_scanners_not_run are deleted.
  • revoke_lease(broker, lease_id) in src/devops_cli/security/vault_lease.py builds the session's lease registry with the broker's token, revokes one lease, and maps a rejected token to the broker's status error and any other refusal to a VaultLeaseError with the masked lease id and the status. _revoke_lease is deleted from devops vault.
  • configure_git_signing(key_path, repo_dir=None) in src/devops_cli/crypto/ssh_keys.py writes the SSH signing settings to the global git config and to the local config of a repository. The devops ssh commands print the message.

Tests on the merged fakes:

Closes #2543

Change: openspec/changes/archive/2026-10-29-2543-security-process-fakes/

…ck and GitHub fakes, and the scan gate, the lease revoke and git signing leave commands

The tests of #1332's files no longer patch a process-layer, clock,
settings or `github.ssh` name. They use `process_fake`, real git in
temporary repositories, the `clock` fixture, the GitHub API fake, the
`config` fixture and a PATH that holds only the programs they need.

Three pieces of logic leave `commands/`:
- `gate_report` in `security/pipeline.py` gives the `--fail-on` verdict
  of a scan report as data.
- `revoke_lease` in `security/vault_lease.py` revokes one lease and maps
  each refusal to its error.
- `configure_git_signing` in `crypto/ssh_keys.py` writes the SSH signing
  settings to git config.

The commands print the same lines and exit with the same status.
@dan-petty

Copy link
Copy Markdown
Owner Author

Test evidence:

Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).

@dan-petty
dan-petty marked this pull request as ready for review October 29, 2026 00:40
@dan-petty
dan-petty merged commit 970e18b into main Oct 29, 2026
17 checks passed
@dan-petty
dan-petty deleted the test/2543-security-process-fakes branch October 29, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant