Repository navigation
Conversation
…ence Local checkpoint paths and internal model names passed the old identity check and were kept in requested.model, requested.model_revision, observed.model, operator profile identities and the aggregates. Model names are now recorded only if publicly approved (nvidia/Cosmos3-Nano, plus exact names in COSMOS_EVIDENCE_PUBLIC_MODELS), and revisions only as commit hashes or 'unknown'; anything else becomes 'redacted'. Unredacted identities can be written to a separate opt-in execution_identity_dir for debugging. Addresses review feedback on NVIDIA#321. Signed-off-by: Jon Patterson <jonp@nvidia.com>
Signed-off-by: Jon Patterson <jonp@nvidia.com>
lfengad
left a comment
There was a problem hiding this comment.
The default writer redacts model identities correctly in my local check. Please also apply that policy when aggregating previously saved records before merging. The directory check below is a separate hardening suggestion.
| return {'format_version': 1, | ||
| 'requested': {'model': _identity(payload.get('model')), 'generation': generation, | ||
| 'model_revision': _identity(requested_model_revision), | ||
| 'requested': {'model': _model_identity(payload.get('model')), 'generation': generation, |
There was a problem hiding this comment.
Please apply the same identity filters inside aggregate_execution_records before building observed_models and grouping requested_settings. I passed a record produced by the base revision to the new aggregator. Both the synthetic non-public model name and its branch revision appeared verbatim in the summary, with debugging disabled. Re-sanitizing a copy of requested.model, requested.model_revision and observed.model at aggregation time would also honor the operator’s current allowlist when older records are reused.
There was a problem hiding this comment.
Done in 3a3202c: aggregate_execution_records now re-applies the identity policy to a copy of each record before building observed_models and requested_settings, so it uses the current allowlist. Checked with a record built by the base revision (non-public name + branch revision): both come out redacted in the summary, the caller's record isn't mutated, and Nano's aggregate is unchanged.
| requested_model_revision=revision) | ||
| writes = [(self.execution_evidence_dir, record)] | ||
| if self.execution_identity_dir is not None: | ||
| writes.append((self.execution_identity_dir, private_identity_record(payload, raw, revision))) |
There was a problem hiding this comment.
Optional hardening: when I configured both output directories to the same temporary directory, it contained two response JSONs, one with the original model name. A private directory nested under the evidence directory would also be included when that tree is shared. Consider resolving both paths and rejecting overlapping directories before writing either file.
There was a problem hiding this comment.
Done too: the constructor resolves both paths and raises if execution_identity_dir equals, is inside, or contains execution_evidence_dir (also caught via .. paths). Separate sibling directories still work. README updated for both.
There was a problem hiding this comment.
One remaining case on c481674: the constructor checks the expanded, absolute paths, but _record_execution writes using the original strings. With execution_evidence_dir="." and execution_identity_dir="~/private" in a working directory outside home, validation sees two separate directories. At write time, Path(target) treats ~ as a literal directory name, so the unredacted file lands under ./~/private/ inside the evidence tree. Please store the two resolved paths on the instance after validation and use those same paths for both writes.
There was a problem hiding this comment.
Good catch, fixed in c7fe0c5. Both directories are now expanded and resolved once in the constructor and stored on the instance; the overlap check and both writes use those same paths. Checked your case (evidence ., identity ~/private, cwd outside home): no literal ./~ is created, the private file lands in the real ~/private, and nothing with the original model path appears under the evidence tree. Overlaps written via ~, ./ or an absolute path to the same place are still rejected; sibling directories still work.
…lapping evidence dirs aggregate_execution_records now re-applies the model/revision policy to copies of each record, so records saved by older versions or under another allowlist cannot leak identities into observed_models or requested_settings. The constructor rejects an execution_identity_dir that equals, contains, or is inside execution_evidence_dir. Addresses review feedback on NVIDIA#430. Signed-off-by: Jon Patterson <jonp@nvidia.com>
…el-paths Signed-off-by: Jon Patterson <jonp@nvidia.com>
…overlap-checked The constructor checked expanded absolute paths but _record_execution wrote with the raw strings, so execution_identity_dir='~/private' with evidence '.' outside home landed in ./~/private inside the evidence tree. Both directories are now resolved once and stored; the check and all writes use them. Addresses review feedback on NVIDIA#430. Signed-off-by: Jon Patterson <jonp@nvidia.com>
…el-paths Signed-off-by: Jon Patterson <jonp@nvidia.com>
satishra-ai
left a comment
There was a problem hiding this comment.
PR #430 is good to merge at e7a0bc7. All 9 independent CPU checks passed. I verified that new evidence and aggregates of older records redact private model identities, public Nano evidence matches the base revision, and opt-in debug files stay in a separate directory.
The tests used real file writes and a mocked HTTP endpoint
…el-paths Signed-off-by: Jon Patterson <jonp@nvidia.com>
…el-paths Signed-off-by: Jon Patterson <jonp@nvidia.com>
Follow-up to #321, addressing @lfengad's review comment on execution evidence.
Problem: the identity check let absolute paths through, so a locally served checkpoint (for example
/home/example/private-run/checkpoint-123) ended up inrequested.model,requested.model_revision,observed.model, operator profile identities and the aggregateobserved_models/requested_settings.Policy now:
nvidia/Cosmos3-Nanoby default, plus exact names listed inCOSMOS_EVIDENCE_PUBLIC_MODELS(comma-separated). Everything else, including local paths and internal names, becomesredacted.unknown. Branches, tags and paths becomeredacted.aggregate_execution_recordsredacts a copy of each record under the current allowlist before buildingobserved_modelsandrequested_settings, so records saved by older versions can't leak identities into the summary. The caller's records are not modified.execution_identity_dirgets a separate per-response file with the original identities ("sanitized": false, mode 0600, directory 0700). The constructor rejects it if it equals, contains, or is insideexecution_evidence_dir, so sharing either tree can't include the other.Unchanged: evidence for
nvidia/Cosmos3-Nanoat its pinned revision is identical to before, so the published launchable baselines are not affected.Checked with a throwaway script:
redactedin the new aggregate; an allowlisted name is kept; Nano's aggregate is unchanged...path to the same directory are all rejected; sibling directories work._record_executionwith and withoutexecution_identity_dir: the evidence directory never contains the original path, and the private file appears only when opted in.README's execution-evidence section documents the policy.