Skip to main content Switch to mobile version second-source 0.6.0 Independent verification of AI agents' claims against the systems they act on.
pip install second-source Copy PIP instructions
Second Source checks the claims that AI coding agents make in pull requests against GitHub's own record. When an agent writes "all tests pass" or "Fixes #123", Second Source looks at the CI jobs on that commit, the files the PR changed, the issue's state and the branch's history, and reports which claims hold up. It is deterministic: rules decide every verdict, and no language model reads the PR.
It runs as a GitHub Action on every agent pull request, or as a command-line tool on any public PR. It supports Claude Code, Codex, Copilot, Cursor, Devin and Jules.
$ uvx second-source check https://github.com/Rarebuffalo/second-source-sandbox/pull/9 Second Source · Rarebuffalo/second-source-sandbox#9 · https://github.com/Rarebuffalo/second-source-sandbox/pull/9 Agent: claude_code (detected by body_marker: Generated with [Claude Code]) Claims: 1 contradicted ✘ contradicted Tests pass said in body: "All tests pass." why: a matching CI job failed - coding.ci_result: 0 of 1 matching CI jobs passed Evidence at a glance (from GitHub, whatever was claimed): - CI on the head commit: 1 passed, 1 failed (test) - Change: 2 file(s) changed; test files changed - Not merged GitHub API requests: 7 Quickstart
Check a single pull request from the command line, with uv installed:
uvx second-source init This writes .github/workflows/second-source.yml, with your CI workflows already listed so verdicts update when CI finishes. Commit it, and the next agent pull request gets a "Second Source" check. The GitHub Action reference shows the workflow in full and explains each input and permission.
Each claim is verified, contradicted, pending or unverifiable. Every check also ends with the evidence itself (CI on the head commit, what the change touched, merge and revert state), so it is useful on pull requests that make no claims. See Claims and verdicts.
Missing evidence is never a contradiction. A claim is contradicted only when GitHub's record clearly disagrees with it, for example when the test job failed on that commit. When evidence is missing, expired or ambiguous, the verdict is unverifiable.
Deterministic. Claims are found with rules whose precision is measured on a labelled set of real agent pull requests, and checks are small YAML files with CEL expressions. The same evidence always gives the same verdict.
Checked while the evidence exists. Since October 2026, GitHub deletes check runs, workflow runs and commit statuses after 90 days by default (at most 90 on public repositories, 400 on private ones; GitHub changelog), so a claim that is not checked when the pull request is made often cannot be checked later. The Action checks at that moment and keeps watching merged claims for reverts and reopened issues.
Hard to game. A verification is withdrawn when the same pull request skips tests, weakens how CI runs them or lowers a coverage gate.
Safe on pull_request_target. The Action never checks out or runs pull request code, treats all PR text as untrusted, and needs no secrets. See the security model.
pull request ─> detect agent ─> extract claims ─> fetch the evidence those claims need ─> run checks (YAML + CEL) ─> verdicts ─> check run, CLI report or JSON The engine knows nothing about code: claims, evidence and checks are generic, and a coding pack supplies the coding-specific rules. How it works explains each step.
Claim extraction is measured on 402 real agent pull requests from the AIDev dataset, half of them held out. On the held-out half, precision is 1.00 for issue references and lint claims and 0.88 for "tests pass" claims. In a benchmark of 1,175 merged agent pull requests, 2 of the 385 that could still be checked had a claim that GitHub's record contradicts; most older "tests pass" claims could no longer be checked because GitHub had deleted the CI runs. Accuracy covers the method, its limits and the open data.
New to Second Source: Quickstart, then the FAQ
Using the Action: GitHub Action reference and Troubleshooting
Using the CLI: CLI reference
Reading results: Claims and verdicts
Security reviewers: Security model and SECURITY.md
Researchers: Accuracy and the benchmark method
Contributors: CONTRIBUTING.md and the architecture
The full index is in docs/; release notes are in CHANGELOG.md.
Second Source is licensed under Apache-2.0. The golden set and the benchmark use the AIDev dataset by Hao Li et al. (hao-li/AIDev), licensed CC-BY-4.0; the PR texts in the golden set remain under that licence (see NOTICE).
Author: Second Source contributors
Both files in this release have provenance metadata.
Apache-2.0 View SPDX License List
ai-agents ci coding-agents evaluation llm pull-requests verification
Development Status 3 - Alpha
Intended Audience Developers
Operating System OS Independent
Programming Language Python :: 3
Topic Software Development :: Quality Assurance
Software Development :: Testing
Release files for second-source 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 805.5 kB
Release files / second_source-0.6.0.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Release files / second_source-0.6.0-py3-none-any.whl
Security for second-source 0.6.0
Both files in this release have been uploaded with provenance metadata.
With provenance second_source-0.6.0.tar.gz Nov 28, 2026
With provenance second_source-0.6.0-py3-none-any.whl Nov 28, 2026
Attestation for second_source-0.6.0.tar.gz
Attestation for second_source-0.6.0-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 28, 2026 2 release files Full provenance
Nov 26, 2026 2 release files Full provenance
Nov 25, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




