agentrust-trace-tests 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentrust_trace_tests-0.1.0/.github/workflows/ci.yml +30 -0
- agentrust_trace_tests-0.1.0/.github/workflows/contributor-check.yml +42 -0
- agentrust_trace_tests-0.1.0/.github/workflows/release.yml +44 -0
- agentrust_trace_tests-0.1.0/.github/workflows/require-maintainer-approval.yml +84 -0
- agentrust_trace_tests-0.1.0/.gitignore +6 -0
- agentrust_trace_tests-0.1.0/CODE_OF_CONDUCT.md +17 -0
- agentrust_trace_tests-0.1.0/CONTRIBUTING.md +18 -0
- agentrust_trace_tests-0.1.0/LICENSE +202 -0
- agentrust_trace_tests-0.1.0/PKG-INFO +94 -0
- agentrust_trace_tests-0.1.0/README.md +57 -0
- agentrust_trace_tests-0.1.0/SECURITY.md +7 -0
- agentrust_trace_tests-0.1.0/pyproject.toml +66 -0
- agentrust_trace_tests-0.1.0/schemas/trace-claim.json +104 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/__init__.py +3 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/cli.py +98 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/loader.py +61 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/__init__.py +1 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/tr_anc.py +34 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/tr_env.py +59 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/tr_pol.py +40 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/tr_rte.py +57 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/tr_sca.py +43 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/tr_sig.py +130 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/modules/tr_txn.py +44 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/result.py +35 -0
- agentrust_trace_tests-0.1.0/src/trace_tests/runner.py +55 -0
- agentrust_trace_tests-0.1.0/tests/__init__.py +0 -0
- agentrust_trace_tests-0.1.0/tests/conftest.py +39 -0
- agentrust_trace_tests-0.1.0/tests/test_level0.py +60 -0
- agentrust_trace_tests-0.1.0/tests/test_level1.py +17 -0
- agentrust_trace_tests-0.1.0/tests/test_level2.py +17 -0
- agentrust_trace_tests-0.1.0/tests/test_schema.py +30 -0
- agentrust_trace_tests-0.1.0/tests/unit/__init__.py +0 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_cli.py +59 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_loader.py +66 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_runner.py +92 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_tr_anc.py +28 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_tr_env.py +72 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_tr_pol.py +45 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_tr_rte.py +64 -0
- agentrust_trace_tests-0.1.0/tests/unit/test_tr_sig.py +104 -0
- agentrust_trace_tests-0.1.0/tests/vectors/invalid_missing_runtime.json +12 -0
- agentrust_trace_tests-0.1.0/tests/vectors/invalid_wrong_profile.json +13 -0
- agentrust_trace_tests-0.1.0/tests/vectors/valid_cmcp_runtime.json +63 -0
- agentrust_trace_tests-0.1.0/tests/vectors/valid_level0.json +36 -0
- agentrust_trace_tests-0.1.0/tests/vectors/valid_level0_with_transcript.json +45 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
- name: Install package and test deps
|
|
24
|
+
run: pip install -e ".[test]"
|
|
25
|
+
- name: Level 0 conformance (schema + structural)
|
|
26
|
+
run: python -m pytest -v -m "level0 or negative" --tb=short
|
|
27
|
+
- name: Unit tests (modules and CLI)
|
|
28
|
+
run: python -m pytest tests/unit/ -v --tb=short
|
|
29
|
+
- name: Full suite
|
|
30
|
+
run: python -m pytest -v --tb=short
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Contributor reputation check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened]
|
|
6
|
+
issues:
|
|
7
|
+
types: [opened]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
inputs:
|
|
10
|
+
username:
|
|
11
|
+
description: GitHub username to check
|
|
12
|
+
required: true
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
issues: write
|
|
17
|
+
pull-requests: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
check:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
if: |
|
|
23
|
+
github.actor != 'dependabot[bot]' &&
|
|
24
|
+
github.actor != 'github-actions[bot]' &&
|
|
25
|
+
github.actor != 'copilot-swe-agent[bot]' &&
|
|
26
|
+
github.actor != 'claude-code[bot]' &&
|
|
27
|
+
github.actor != 'imran-siddique'
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout org action
|
|
30
|
+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
31
|
+
with:
|
|
32
|
+
repository: agentrust-io/.github
|
|
33
|
+
ref: main
|
|
34
|
+
persist-credentials: false
|
|
35
|
+
sparse-checkout: |
|
|
36
|
+
scripts
|
|
37
|
+
.github/actions/contributor-check
|
|
38
|
+
|
|
39
|
+
- name: Run contributor check
|
|
40
|
+
uses: ./.github/actions/contributor-check
|
|
41
|
+
with:
|
|
42
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
16
|
+
|
|
17
|
+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
|
|
21
|
+
- name: Install build
|
|
22
|
+
run: python -m pip install build
|
|
23
|
+
|
|
24
|
+
- name: Build distributions
|
|
25
|
+
run: python -m build
|
|
26
|
+
|
|
27
|
+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
28
|
+
with:
|
|
29
|
+
name: dist
|
|
30
|
+
path: dist/
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment: pypi
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write # OIDC trusted publishing, no API tokens
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
40
|
+
with:
|
|
41
|
+
name: dist
|
|
42
|
+
path: dist/
|
|
43
|
+
|
|
44
|
+
- uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: Require maintainer approval
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request_target:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
branches: [main]
|
|
7
|
+
# Re-evaluate the gate when a review is submitted or dismissed so an
|
|
8
|
+
# approval clears the failing status without waiting for a new push.
|
|
9
|
+
# Note: pull_request_review does not support a branches filter, so the
|
|
10
|
+
# base-branch check lives in the job-level `if` below.
|
|
11
|
+
pull_request_review:
|
|
12
|
+
types: [submitted, dismissed]
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
pull-requests: read
|
|
17
|
+
statuses: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
gate:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
if: github.event.pull_request.base.ref == 'main'
|
|
23
|
+
steps:
|
|
24
|
+
- name: Check for maintainer approval
|
|
25
|
+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
script: |
|
|
28
|
+
const MAINTAINERS = ['imran-siddique'];
|
|
29
|
+
|
|
30
|
+
const author = context.payload.pull_request.user.login;
|
|
31
|
+
if (MAINTAINERS.includes(author)) {
|
|
32
|
+
core.info(`Author ${author} is a maintainer, skipping gate`);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const association = context.payload.pull_request.author_association;
|
|
37
|
+
if (association === 'MEMBER' || association === 'OWNER') {
|
|
38
|
+
core.info(`Author is ${association}, skipping gate`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Both pull_request_target and pull_request_review payloads
|
|
43
|
+
// carry the PR at context.payload.pull_request.
|
|
44
|
+
const prNumber = context.payload.pull_request.number;
|
|
45
|
+
|
|
46
|
+
// Re-fetch the PR so we compare against the head SHA at
|
|
47
|
+
// evaluation time, not a possibly stale SHA from the payload.
|
|
48
|
+
const { data: pr } = await github.rest.pulls.get({
|
|
49
|
+
owner: context.repo.owner,
|
|
50
|
+
repo: context.repo.repo,
|
|
51
|
+
pull_number: prNumber,
|
|
52
|
+
});
|
|
53
|
+
const headSha = pr.head.sha;
|
|
54
|
+
|
|
55
|
+
// Paginate: listReviews otherwise returns only the first 30.
|
|
56
|
+
const reviews = await github.paginate(github.rest.pulls.listReviews, {
|
|
57
|
+
owner: context.repo.owner,
|
|
58
|
+
repo: context.repo.repo,
|
|
59
|
+
pull_number: prNumber,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Only a maintainer's most recent non-comment review counts,
|
|
63
|
+
// and it must approve the current head commit. An approval of
|
|
64
|
+
// an older commit does not clear the gate after a later push
|
|
65
|
+
// (prevents approve-then-swap).
|
|
66
|
+
const latestByMaintainer = new Map();
|
|
67
|
+
for (const review of reviews) {
|
|
68
|
+
if (
|
|
69
|
+
review.user &&
|
|
70
|
+
review.user.type === 'User' &&
|
|
71
|
+
MAINTAINERS.includes(review.user.login) &&
|
|
72
|
+
review.state !== 'COMMENTED'
|
|
73
|
+
) {
|
|
74
|
+
latestByMaintainer.set(review.user.login, review);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const approved = [...latestByMaintainer.values()].some(
|
|
79
|
+
(r) => r.state === 'APPROVED' && r.commit_id === headSha
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
if (!approved) {
|
|
83
|
+
core.setFailed('Waiting for maintainer approval of the current head commit before merging.');
|
|
84
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We pledge to make participation in our community a harassment-free experience for everyone.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
Positive behavior: welcoming and inclusive language, respecting differing viewpoints, gracefully accepting constructive criticism, focusing on what is best for the community.
|
|
10
|
+
|
|
11
|
+
Unacceptable behavior: sexualized language or imagery, trolling, insulting comments, personal or political attacks, public or private harassment, publishing others' private information without permission.
|
|
12
|
+
|
|
13
|
+
## Enforcement
|
|
14
|
+
|
|
15
|
+
Report instances of abusive behavior via [GitHub Security Advisories](https://github.com/agentrust-io/trace-tests/security/advisories/new).
|
|
16
|
+
|
|
17
|
+
Adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to the TRACE test suite.
|
|
4
|
+
|
|
5
|
+
## How to Contribute
|
|
6
|
+
|
|
7
|
+
1. Fork the repository and create a feature branch
|
|
8
|
+
2. Add or update conformance tests following the patterns in existing test files
|
|
9
|
+
3. Commit using [Conventional Commits](https://www.conventionalcommits.org)
|
|
10
|
+
4. Open a pull request against `main`
|
|
11
|
+
|
|
12
|
+
## Reporting Security Issues
|
|
13
|
+
|
|
14
|
+
Use [GitHub Security Advisories](https://github.com/agentrust-io/trace-tests/security/advisories/new) rather than public issues.
|
|
15
|
+
|
|
16
|
+
## Code of Conduct
|
|
17
|
+
|
|
18
|
+
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
202
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentrust-trace-tests
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: TRACE conformance test suite
|
|
5
|
+
Project-URL: Homepage, https://github.com/agentrust-io/trace-tests
|
|
6
|
+
Project-URL: Repository, https://github.com/agentrust-io/trace-tests
|
|
7
|
+
Project-URL: Documentation, https://github.com/agentrust-io/trace-tests#readme
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/agentrust-io/trace-tests/issues
|
|
9
|
+
Author: agentrust.io
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai-agents,attestation,conformance,provenance,trace
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Classifier: Topic :: Software Development :: Testing
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: click>=8.1
|
|
24
|
+
Requires-Dist: cryptography>=42
|
|
25
|
+
Requires-Dist: jsonschema>=4.23
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: bandit; extra == 'dev'
|
|
28
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
29
|
+
Requires-Dist: pip-audit; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
33
|
+
Provides-Extra: test
|
|
34
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
35
|
+
Requires-Dist: pytest>=8.0; extra == 'test'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
[](LICENSE)
|
|
39
|
+
[](https://github.com/agentrust-io/trace-spec)
|
|
40
|
+
[]()
|
|
41
|
+
|
|
42
|
+
# TRACE Conformance Test Suite
|
|
43
|
+
|
|
44
|
+
Conformance tests for TRACE v0.1 - Trust, Runtime Attestation, and Compliance Evidence. An implementation producing Trust Records must pass all tests in the applicable level before using the "TRACE-conformant" mark.
|
|
45
|
+
|
|
46
|
+
If you are building a gateway, agent runtime, or orchestration layer that produces TRACE records, run this suite against your output to verify conformance before claiming TRACE compliance.
|
|
47
|
+
|
|
48
|
+
## Test modules
|
|
49
|
+
|
|
50
|
+
| Module | ID prefix | Spec section | What it tests |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
| Envelope | `TR-ENV` | §3.2 | EAT envelope structure, `eat_profile` URI, required fields, `iat` validity |
|
|
53
|
+
| Signature | `TR-SIG` | §3.2.1 | Algorithm conformance (ES256/ES384/EdDSA), key binding, chain verification |
|
|
54
|
+
| Runtime | `TR-RTE` | §3.1 | TEE platform enum, measurement format, RIM URI resolution |
|
|
55
|
+
| Policy | `TR-POL` | §3.1 | Policy bundle hash format, enforcement mode values, TEE binding |
|
|
56
|
+
| Transcript | `TR-TXN` | §3.1 | Tool-call transcript hash binding (Phase 2+ records) |
|
|
57
|
+
| Transparency | `TR-ANC` | §3.2 | SCITT receipt URI format, inclusion proof structure |
|
|
58
|
+
| Provenance | `TR-SCA` | §3.1 | SLSA provenance level, builder URI, digest format |
|
|
59
|
+
|
|
60
|
+
## Conformance levels
|
|
61
|
+
|
|
62
|
+
| Level | Required modules | Use case |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| 0 | TR-ENV, TR-SIG, TR-POL | Software-only development and staging |
|
|
65
|
+
| 1 | Level 0 + TR-RTE, TR-SCA | Production TEE-attested records |
|
|
66
|
+
| 2 | Level 1 + TR-TXN, TR-ANC | Full records with transparency anchoring |
|
|
67
|
+
|
|
68
|
+
## Running
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pip install trace-tests
|
|
72
|
+
trace-tests verify --record path/to/trust-record.jwt --level 1
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Test structure
|
|
76
|
+
|
|
77
|
+
Each test case includes:
|
|
78
|
+
- A normative reference to the spec section it exercises
|
|
79
|
+
- A **positive case** - valid input, expected result: `PASS`
|
|
80
|
+
- A **negative case** - invalid input, expected result: `FAIL` with a structured error code
|
|
81
|
+
|
|
82
|
+
Error codes follow the form `TR-<MODULE>-<NNN>` (e.g., `TR-ENV-001`: missing `eat_profile`).
|
|
83
|
+
|
|
84
|
+
## Status
|
|
85
|
+
|
|
86
|
+
Test suite v0.1, in development. The TRACE spec publishes at Confidential Computing Summit, June 23 2026, and the test suite will be usable at that point. The certification program is on a separate timeline, launching 2027.
|
|
87
|
+
|
|
88
|
+
## Contributing
|
|
89
|
+
|
|
90
|
+
Open an issue or PR. New tests must include the normative spec reference, a positive case, and a negative case.
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
Apache 2.0
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[](LICENSE)
|
|
2
|
+
[](https://github.com/agentrust-io/trace-spec)
|
|
3
|
+
[]()
|
|
4
|
+
|
|
5
|
+
# TRACE Conformance Test Suite
|
|
6
|
+
|
|
7
|
+
Conformance tests for TRACE v0.1 - Trust, Runtime Attestation, and Compliance Evidence. An implementation producing Trust Records must pass all tests in the applicable level before using the "TRACE-conformant" mark.
|
|
8
|
+
|
|
9
|
+
If you are building a gateway, agent runtime, or orchestration layer that produces TRACE records, run this suite against your output to verify conformance before claiming TRACE compliance.
|
|
10
|
+
|
|
11
|
+
## Test modules
|
|
12
|
+
|
|
13
|
+
| Module | ID prefix | Spec section | What it tests |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| Envelope | `TR-ENV` | §3.2 | EAT envelope structure, `eat_profile` URI, required fields, `iat` validity |
|
|
16
|
+
| Signature | `TR-SIG` | §3.2.1 | Algorithm conformance (ES256/ES384/EdDSA), key binding, chain verification |
|
|
17
|
+
| Runtime | `TR-RTE` | §3.1 | TEE platform enum, measurement format, RIM URI resolution |
|
|
18
|
+
| Policy | `TR-POL` | §3.1 | Policy bundle hash format, enforcement mode values, TEE binding |
|
|
19
|
+
| Transcript | `TR-TXN` | §3.1 | Tool-call transcript hash binding (Phase 2+ records) |
|
|
20
|
+
| Transparency | `TR-ANC` | §3.2 | SCITT receipt URI format, inclusion proof structure |
|
|
21
|
+
| Provenance | `TR-SCA` | §3.1 | SLSA provenance level, builder URI, digest format |
|
|
22
|
+
|
|
23
|
+
## Conformance levels
|
|
24
|
+
|
|
25
|
+
| Level | Required modules | Use case |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| 0 | TR-ENV, TR-SIG, TR-POL | Software-only development and staging |
|
|
28
|
+
| 1 | Level 0 + TR-RTE, TR-SCA | Production TEE-attested records |
|
|
29
|
+
| 2 | Level 1 + TR-TXN, TR-ANC | Full records with transparency anchoring |
|
|
30
|
+
|
|
31
|
+
## Running
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install trace-tests
|
|
35
|
+
trace-tests verify --record path/to/trust-record.jwt --level 1
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Test structure
|
|
39
|
+
|
|
40
|
+
Each test case includes:
|
|
41
|
+
- A normative reference to the spec section it exercises
|
|
42
|
+
- A **positive case** - valid input, expected result: `PASS`
|
|
43
|
+
- A **negative case** - invalid input, expected result: `FAIL` with a structured error code
|
|
44
|
+
|
|
45
|
+
Error codes follow the form `TR-<MODULE>-<NNN>` (e.g., `TR-ENV-001`: missing `eat_profile`).
|
|
46
|
+
|
|
47
|
+
## Status
|
|
48
|
+
|
|
49
|
+
Test suite v0.1, in development. The TRACE spec publishes at Confidential Computing Summit, June 23 2026, and the test suite will be usable at that point. The certification program is on a separate timeline, launching 2027.
|
|
50
|
+
|
|
51
|
+
## Contributing
|
|
52
|
+
|
|
53
|
+
Open an issue or PR. New tests must include the normative spec reference, a positive case, and a negative case.
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
Apache 2.0
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a Vulnerability
|
|
4
|
+
|
|
5
|
+
Do not report security vulnerabilities through public GitHub issues.
|
|
6
|
+
|
|
7
|
+
Use [GitHub Security Advisories](https://github.com/agentrust-io/trace-tests/security/advisories/new) to report privately. We respond within 72 hours.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agentrust-trace-tests"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "TRACE conformance test suite"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "Apache-2.0" }
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "agentrust.io" },
|
|
13
|
+
]
|
|
14
|
+
keywords = ["trace", "conformance", "attestation", "ai-agents", "provenance"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 3 - Alpha",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: Apache Software License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Topic :: Software Development :: Testing",
|
|
24
|
+
"Topic :: Security",
|
|
25
|
+
]
|
|
26
|
+
requires-python = ">=3.11"
|
|
27
|
+
dependencies = [
|
|
28
|
+
"click>=8.1",
|
|
29
|
+
"cryptography>=42",
|
|
30
|
+
"jsonschema>=4.23",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/agentrust-io/trace-tests"
|
|
35
|
+
Repository = "https://github.com/agentrust-io/trace-tests"
|
|
36
|
+
Documentation = "https://github.com/agentrust-io/trace-tests#readme"
|
|
37
|
+
"Bug Tracker" = "https://github.com/agentrust-io/trace-tests/issues"
|
|
38
|
+
|
|
39
|
+
[project.scripts]
|
|
40
|
+
trace-tests = "trace_tests.cli:main"
|
|
41
|
+
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
dev = ["agentrust-trace-tests[test]", "ruff", "mypy", "bandit", "pip-audit"]
|
|
44
|
+
test = ["pytest>=8.0", "pytest-cov"]
|
|
45
|
+
|
|
46
|
+
[tool.hatch.build.targets.wheel]
|
|
47
|
+
packages = ["src/trace_tests"]
|
|
48
|
+
|
|
49
|
+
[tool.pytest.ini_options]
|
|
50
|
+
testpaths = ["tests"]
|
|
51
|
+
markers = [
|
|
52
|
+
"level0: Level 0 conformance -- structural and schema validity",
|
|
53
|
+
"level1: Level 1 conformance -- signed EAT envelope present",
|
|
54
|
+
"level2: Level 2 conformance -- hardware TEE attestation binding",
|
|
55
|
+
"negative: Negative tests -- invalid records must be rejected",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
[tool.ruff]
|
|
59
|
+
line-length = 100
|
|
60
|
+
|
|
61
|
+
[tool.ruff.lint]
|
|
62
|
+
select = ["E", "F", "I", "SIM"]
|
|
63
|
+
|
|
64
|
+
[tool.mypy]
|
|
65
|
+
python_version = "3.11"
|
|
66
|
+
strict = true
|