Repository navigation
Conversation
A provenance_id is unique only within its own session, and nothing tied a memoryContextRetrieval result to the memoryStore write it came from. The same entry written from tool_output validated when it came back as retrieved, system or user_input, even under ACS-Provenance, so stored untrusted content read back as trusted recall. memoryStore now carries lineage (lineage_id, origin_session_id and the writing session's provenance_summary) and memoryContextRetrieval results echo it with the stored provenance. memory_id is required on both hooks when the scope is user, tenant or global. A result with lineage must have origin retrieved, and the strict profile requires lineage, a non-empty derived_from and the writer's summary on every result. Specification section 7.3 states the rules a schema cannot: derived_from cites the lineage_id, a Guardian classifies by the stored provenance, a result with no lineage is never treated as fresh, and the reading session starts from the writer's origins. The memoryStore summary on the Hooks page drops a TTL the schema does not have. Trust stays out of the wire, as section 7.1 reserves it. The reference Guardian does not yet dispatch either hook; that is left to a follow-up. Closes GenAI-Security-Project#501 Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
drk-ram
requested review from
GangGreenTemperTatum,
afogel,
almogbhl,
bar-capsule,
fewdisc,
mamicidal,
rocklambros,
sclintonowasp and
stefanoamorelli
as code owners
November 6, 2026 16:31
|
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. |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
Memory writes and reads now carry cross-session lineage.
memoryStoregains alineagemember (lineage_id,origin_session_id, the writing session'sprovenance_summary), and eachmemoryContextRetrievalresult echoes it with the stored provenance.memory_idis required on both hooks when the scope isuser,tenantorglobal. Stored untrusted content can no longer read back assystem,user_inputor an unattributedretrievedentry under ACS-Provenance. Specification section 7.3 states the rules a schema cannot enforce.Which issue does this implement
Closes #501
meaning, so it needs no issue
Base branch
integration, because this touches the specification, schemas, a referenceimplementation, an adapter, tests, or CI
main, because every changed path is on the documentation lane allowlist inCONTRIBUTING.md
Type of change
Specification changes
Breaking for implementers? Mostly additive. The base schemas gain optional members, so an ACS-Core sender that sends no lineage still validates, with two exceptions. A write or read in a
user,tenantorglobalstore without amemory_idis now invalid, and a result that carrieslineagemust haveprovenance.origin: retrieved. A sender claiming ACS-Provenance must now sendlineageon every write and read result, a non-emptyderived_fromon each result's provenance, and the writer'sprovenance_summary.Choices made for the issue's open questions:
lineage_id, plusorigin_session_id, because aprovenance_idresolves only in its own session. The result'sprovenance.derived_fromcites thelineage_id(prose in section 7.3, since a schema cannot compare siblings).memory_idrequired when the scope is notsession.provenance_summarytravels inlineageand the reading session starts from at least itsorigins_seen.trustfor a later version, so this carries facts (origin, lineage, summary) and leaves classification to policy. It adds nosource_trustor taint-tag member.memoryStoreandmemoryContextRetrievalinmethods_evaluatedis a code change and is left to a follow-up.I tested this
I synced my branch with the base branch before opening this
uv run pytest -vpasses on my machineuv run mkdocs build --strictpasses on my machineuv run pytest tests/test_memory_lineage.py -q: 45 passed. The 31 schema and prose tests fail when the specification and docs changes are stashed.uv run pytest -q: 1245 passed, 10 failed, 20 errors. The failures and errors are the same symlink, subprocess and timing tests intest_fetch_roadmap,test_overrides,test_pr_intake_workflow,test_publish_schemasandtest_closing_choicethat fail on this Windows machine without this change.uv run mkdocs build --strict: passesChecklist
git commit -s(required by the DCO)Security
This closes a memory-poisoning path (ASI06): untrusted content written in one session could be read back in another as trusted recall. The change adds wire members and rules that let a Guardian recover the trust basis of a stored entry.