Repository navigation
docs(spec): add agent-change-admission-v1 predicate for change admission - #593
zhaoxinghua09-cell wants to merge 6 commits into
Conversation
Proposes a predicate family for the question GenAI-Security-Project#33 raises: who may admit an agent's configuration change, and on what evidence. Two conditions from the 3 Nov thread are made normative rather than prose: the lift must bind the payload the peer witnessed, and EXTERNAL independence must cover the Guardian as well as the agent. The spec ships with an executable conformance checker and 23 vectors (P1-P3 positive, N1-N20 negative), one per rejection reason code, built on real Ed25519 keys generated in-process. Known gap, stated rather than papered over: v0.1.0 has no registry and no steward body, so this predicate cannot point at a revocation authority yet. The checker treats a missing registry as fail-closed instead of fail-open. Reviewed externally before posting: three models served via SiliconFlow (DeepSeek-V3.2, GLM-5.3, Qwen3.5-27B) returned 56 findings against the draft. About 35 were real and are fixed here, including a role-block confusion that let a witness key sign a peer verdict, an empty-digest equality that passed the subject check, and a replay path that admitted a byte-identical re-submission. Signed-off-by: Xinghua Zhao <zhaoxinghua09-cell@users.noreply.github.com>
Signed-off-by: Xinghua Zhao <zhaoxinghua09-cell@users.noreply.github.com>
|
Thanks for this. It is queued rather than ignored. A lead has not reviewed this pull request yet. A lead will read it when they have time, and we can't promise a date. Nothing here is rejected. If a check below fails, please fix it. A pull request that waits a long time may be closed, and you can reopen it later. |
…eck demanded Every https: type URI in the draft returned HTTP 503. The host was ours, but it serves nothing, which makes those identifiers a defect a reviewer finds with one curl. Since ACS v0.1.0 has no registry (docs/spec/conformance.md says so outright), there is no authority to resolve a type URI against; a URN states that honestly. https: URIs will be minted when a registry exists, with these URNs kept as aliases so nothing signed today becomes unverifiable. Also regenerated examples/ so the vector files carry the new identifiers; 23/23 still passes. Signed-off-by: Xinghua Zhao <zhaoxinghua09-cell@users.noreply.github.com>
74fbcf3 to
aead756
Compare
Review feedback: the MUST NOT dereference / fail-closed requirement sat inside a rationale paragraph, so a reader scanning for normative text could miss it. Rationale now records the observed 503 and the absence of a registry; the requirement is its own subsection. Also removes colloquial phrasing. Signed-off-by: Zhao Xinghua <zhaoxinghua09@users.noreply.github.com>
Resolves the nav conflict with the conformance-claim-template entry that landed upstream, so the branch is mergeable again. No content change beyond mkdocs.yml. Signed-off-by: Zhao Xinghua <zhaoxinghua09@users.noreply.github.com>
The render test pins the pane's expanded row count to the design's number. Adding one group and one entry makes it 55. The premortem's derivation is left as the historical record; this is the new number that follows from the nav in this branch. Without this the PR would fail test_render_nav_emits_the_pane_in_order, which is not a test about predicates, and a reviewer should not have to discover that. Signed-off-by: Zhao Xinghua <zhaoxinghua09@users.noreply.github.com>
|
CI is green now. Two things were red, and neither was in the diff.
Latest runs on The diff is unchanged since my last message. A fresh clone of the branch gives 4 failed / 1234 I am making no further changes until someone reads this. If it helps, I am happy to split the |
|
Hi @zhaoxinghua09-cell and @narko4u, Following up on my note in #33, I ran a local check against
Across P3, D1, and D2, the verifier context and signing key remained identical, and the signatures pass under the checker's current convention. Existing negative controls for an invalid signature, a missing pin, and neither identity being named reject as expected. The unchanged 23-vector suite also passes. In isolated local copies, enforcing both identities rejects D1 and comparing the admission digest rejects D2 while keeping P3 green. Restoring the original checker restores acceptance of both cases. These results apply strictly to the standalone checker and its synthetic fixtures. They preserve the fixture's signing convention and omission of Reproducible signed vectors (D1 & D2) and verification snippetThe three JSON files below contain the frozen inputs used in this reproduction. Save each as UTF-8 without a BOM, using LF line endings and one final newline, to preserve the listed file hashes. The public context contains only public keys. Do not regenerate it with D1-agent-only.json SHA-256: {
"_sig": "UvcWxnez+o7dJCq2OLW0rPv6Ij3vXyG3E6r7psHEk5bDrLiSGMxXo+5ulN09ndf8L2De6bR08yiuVAftVxaJAw==",
"_type": "https://in-toto.io/Statement/v1",
"predicate": {
"anchor": {
"key_id": "anchor-key-1",
"org": "org:independent-notary",
"pin": {
"key_fingerprint": "sha256:3aedf812d4b9ff0af7d78eef9c9dc6f2894267fd1db86a7019c2684ccb20b09a",
"pinned_at": "2026-10-30T00:00:00Z",
"registry_uri": "https://registry.example.org/keys/anchor-key-1"
}
},
"anchored_at": "2026-11-17T02:00:00Z",
"binds": {
"statement_digest": {
"sha256": "e00e40c5e0f8fa64d01d9030ac7650d5ca2a68596223920fa1848d56ed184cc1"
}
},
"independent_of": [
"agent:researcher-01"
],
"witness_scope": "external"
},
"predicateType": "urn:lgd:acs:predicate:agent-change-anchor:v1",
"subject": [
{
"digest": {
"sha256": "16aad0ab433ac8e5d9b962b7a60d69212eb3ea356abb044887d05281b314b7af"
},
"name": "change-payload"
}
]
}D2-wrong-admission-digest.json SHA-256: {
"_sig": "z4H07MgqjP4HK1pouhWwG7ivj/69QCtnfH8fMWNeDr8jffL+QPzFoFNcLcWWD033+kAccfE4VRaM34Gw5gurBg==",
"_type": "https://in-toto.io/Statement/v1",
"predicate": {
"anchor": {
"key_id": "anchor-key-1",
"org": "org:independent-notary",
"pin": {
"key_fingerprint": "sha256:3aedf812d4b9ff0af7d78eef9c9dc6f2894267fd1db86a7019c2684ccb20b09a",
"pinned_at": "2026-10-30T00:00:00Z",
"registry_uri": "https://registry.example.org/keys/anchor-key-1"
}
},
"anchored_at": "2026-11-17T02:00:00Z",
"binds": {
"statement_digest": {
"sha256": "000e40c5e0f8fa64d01d9030ac7650d5ca2a68596223920fa1848d56ed184cc1"
}
},
"independent_of": [
"agent:researcher-01",
"org:guardian"
],
"witness_scope": "external"
},
"predicateType": "urn:lgd:acs:predicate:agent-change-anchor:v1",
"subject": [
{
"digest": {
"sha256": "16aad0ab433ac8e5d9b962b7a60d69212eb3ea356abb044887d05281b314b7af"
},
"name": "change-payload"
}
]
}public-context.json SHA-256: The key values are raw Ed25519 public keys encoded as hexadecimal. The snippet reconstructs the key objects and the context's set and tuple-keyed dictionary before calling {
"active_policy_versions": [
"2026.11.1"
],
"admission_context": {
"request_id": "b0a2f7c4-2e21-4a10-9d55-0e6b8c2f4a13",
"session_id": "6f1c2a9e-1d40-4d3e-9c3a-77ab01e2c9de"
},
"admission_statement_digest": "e00e40c5e0f8fa64d01d9030ac7650d5ca2a68596223920fa1848d56ed184cc1",
"keys": {
"anchor-key-1": "1515213d6e92d200998701b9bf92d2a6c287885b6337d315b63322998d45d2c0",
"guardian-key-1": "a853897b6b0072271474410981204a3699dce31910ddbfe04e452c43a60852fe",
"peer-key-1": "d7a4651fcd4dead4146421244e919493d63c463ee24d1453880bfee6797532d8"
},
"ledger": [],
"observed": {
"agent_id": "agent:researcher-01",
"control_domain": "org:guardian",
"key_id": "guardian-key-1",
"org": "org:guardian"
},
"registry": {
"anchor-key-1": {
"fingerprint": "sha256:3aedf812d4b9ff0af7d78eef9c9dc6f2894267fd1db86a7019c2684ccb20b09a",
"pinned_at": "2026-10-30T00:00:00Z",
"writable_by_observed": false
},
"peer-key-1": {
"fingerprint": "sha256:4f4786c1a574dcd0ba828ca9e3d6f31dd1f9895cfeef5ccfb0e3eb2480de6223",
"pinned_at": "2026-10-30T00:00:00Z",
"writable_by_observed": false
}
}
}Verification Use the unchanged checker from commit Its SHA-256 is Run from the repository root, with the three JSON files saved there and The command imports the checker and calls python -I -B -c "
import hashlib, importlib.util, json, sys
from pathlib import Path
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
checker_path, data_dir = Path(sys.argv[1]), Path(sys.argv[2])
expected_checker = '249224c427c796025d20a3a0e1f6bc6469b7eba8bc9756b6ee464b5ea94cada1'
if hashlib.sha256(checker_path.read_bytes()).hexdigest() != expected_checker:
raise SystemExit('Checker SHA-256 mismatch')
hashes = {
'D1-agent-only.json': '9427ac1911c321f30ec1de977b2e8f269d1fe7561a86802c428d331e36c1cc1d',
'D2-wrong-admission-digest.json': 'af2bc052c2a891b6f437e88d7ce729cf1c255cb2c51c2e2fb0371552d1affc12',
'public-context.json': '357f57475b0e78cbcedd797ffc7658182073c64f9c1af9dce665fb32f06c8db0',
}
frozen = {}
for name, expected in hashes.items():
raw = (data_dir / name).read_bytes()
if hashlib.sha256(raw).hexdigest() != expected:
raise SystemExit(name + ': SHA-256 mismatch')
frozen[name] = raw.decode('utf-8')
spec = importlib.util.spec_from_file_location('checker', checker_path)
checker = importlib.util.module_from_spec(spec)
spec.loader.exec_module(checker)
for name in ('D1-agent-only.json', 'D2-wrong-admission-digest.json'):
ctx = json.loads(frozen['public-context.json'])
ctx['keys'] = {
key_id: Ed25519PublicKey.from_public_bytes(bytes.fromhex(value))
for key_id, value in ctx['keys'].items()
}
ctx['active_policy_versions'] = set(ctx['active_policy_versions'])
ctx['ledger'] = {(sid, rid): digest for sid, rid, digest in ctx['ledger']}
result = checker.verify(json.loads(frozen[name]), ctx)
print(name + ': ' + json.dumps(result))
assert result == {'ok': True, 'scope': 'external', 'codes': [], 'kind': 'anchor'}, result
" docs/spec/predicates/agent-change-admission-v1/check_admission.py .Observed output: The command exits with code 0 and no stderr. Here, exit 0 means that the reported acceptance was reproduced. It does not mean these negative cases satisfy the intended requirements. The snippet reproduces D1 and D2 only; it does not rerun the separate controls or corrective calibration described above. René Atencio Roa Disclosure: I used AI assistance during the local verification. |
|
Rene — thank you for running this, and for the frozen vectors; that is exactly the kind of check this predicate needs before it merges. Both findings are accepted as real gaps in the checker as shipped at cef74ab: D1 shows the independence check does not enforce what §6 and AC-4 require (both agent and Guardian), and D2 shows the anchor branch never compares binds.statement_digest against the admission digest in the verifier context. The 23-vector suite passing does not cover either case, so I will add D1 and D2 as negative vectors and fix the checker — require both identities in independent_of for the external scope, and compare the admission digest — then re-run the full suite plus your two vectors and report the result here. Scope noted: this is the standalone checker and its synthetic fixtures, not a claim about a deployed Guardian. I will also keep the P3 positive case green through the fix. |
|
Hi Steven, this PR now conflicts with |
|
I moved this PR's base to |
|
Understood — rebuilding this on — Individual expert, zhaoxinghua09-cell |
Which issue does this implement
Part of #33. This change does not resolve that issue: the namespace, the directory and the
vector format are still open questions, and I am asking them in Refs #596 rather than
answering them by landing code.