-
Notifications
You must be signed in to change notification settings - Fork 0
Add EvidenceReceipt v2 verifier support #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
87a43af
feat: v0.2.0 — EvidenceReceipt v2 + well-known directory
luckyPipewrench b64fa7d
tests: cross-implementation conformance for EvidenceReceipt v2
luckyPipewrench 7a842f9
fix: break import cycle between _verify and _evidence
luckyPipewrench a63c4f4
fix: report declared chain_seq in v2 fail-closed chain branch
luckyPipewrench 426aa5a
chore: fix lint + typecheck CI (pre-existing, surfaced after b64fa7d)
luckyPipewrench b206f0f
chore: harden v0.2.0 release workflows
luckyPipewrench e939004
Merge remote-tracking branch 'origin/main' into feat/v0.2.0-evidence-…
luckyPipewrench 39b2818
ci: expose package path to test job
luckyPipewrench 683710c
test: let fuzz target surface unexpected exceptions
luckyPipewrench File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Fuzz | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| tags-ignore: ['v*'] | ||
| pull_request: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: '17 4 * * 1' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| security-scan: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Pipelock Scan | ||
| uses: luckyPipewrench/pipelock@7a3b7de4a5552b4e756eb930256468b7cbd616b1 # v2.3.0 | ||
| with: | ||
| scan-diff: 'true' | ||
| fail-on-findings: 'true' | ||
| test-vectors: 'false' | ||
| exclude-paths: | | ||
| tests/conformance/ | ||
|
|
||
| atheris: | ||
| needs: [security-scan] | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install locked fuzz dependencies | ||
| run: python -m pip install --require-hashes -r requirements/fuzz.txt | ||
|
|
||
| - name: Atheris receipt parser smoke | ||
| run: python fuzz/receipt_fuzzer.py -runs=256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| """Atheris fuzz target for receipt parsing and verification paths. | ||
|
|
||
| The target intentionally ignores verifier outcomes: invalid receipts are expected. | ||
| It only treats uncaught exceptions as findings. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import sys | ||
| from pathlib import Path | ||
|
|
||
| import atheris | ||
|
|
||
| sys.path.insert(0, str(Path(__file__).resolve().parents[1])) | ||
|
|
||
| with atheris.instrument_imports(): | ||
| import pipelock_verify | ||
|
|
||
|
|
||
| def TestOneInput(data: bytes) -> None: | ||
| if len(data) > 16384: | ||
| data = data[:16384] | ||
|
|
||
| try: | ||
| text = data.decode("utf-8", errors="ignore") | ||
| pipelock_verify.verify(text) | ||
| except (MemoryError, RecursionError): | ||
| raise | ||
| except Exception: | ||
| # Malformed receipts, bad JSON, bad signatures, and unsupported shapes | ||
| # are expected corpus cases. The fuzzer is looking for crashes. | ||
| return | ||
|
|
||
|
|
||
| def main() -> None: | ||
| atheris.Setup(sys.argv, TestOneInput) | ||
| atheris.Fuzz() | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.