feat(cli): inject policy inputs from CSV/JSON files at attestation add#3244
Conversation
AI Session Analysis
|
| Status | Policy | Material | Messages |
|---|---|---|---|
| ✅ Passed | ai-config-ai-agents-allowed |
ai-coding-session-fe524d |
- |
ai-config-no-dangerous-commands |
ai-coding-session-fe524d |
|
|
| ✅ Passed | ai-config-no-secrets |
ai-coding-session-fe524d |
- |
ai-config-mcp-servers-allowed |
ai-coding-session-fe524d |
MCP server 'claude_ai_Mermaid_Chart' is not in the allowed list |
Powered by Chainloop and Chainloop Trace
There was a problem hiding this comment.
3 issues found across 11 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
df975e0 to
61552c0
Compare
6ce17d5 to
784ee26
Compare
784ee26 to
8a6f47a
Compare
c6e16b8 to
5ba5453
Compare
Add a repeatable --policy-input-from-file <input>[:<column>]=<file> flag to `chainloop attestation add` that extracts... The source file is recorded as an EVIDENCE material, cross-linked to the evaluated material via a generic chainloop.m... CSV parsing reuses the existing sigcheck parser; JSON accepts a string array, an array of objects, or an object mappi... Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: fe524d3a-ae31-482c-8675-45df3bfe4d81
5ba5453 to
264328e
Compare
Closes #3250
Summary
Adds a repeatable
--policy-input-from-file <input>=<file>[:<column>]flag tochainloop attestation addthat sources a policy input from a column of a CSV or JSON file and injects it during material policy evaluation. The primary use case is feeding theignored_pathsinput of the Sysinternals sigcheck binary-signing policies from a large, data-driven exemption list, but the flag is generic over both the input name and the source column.Details
:<column>suffix selects the column and defaults to the input name; a column is always a single, top-level field/header name. The column is the segment after the last:, so a Windows drive letter (C:\...) or URL scheme (https://) in the file path is not mistaken for a column.EVIDENCEmaterial named<material>-<input>(the input name sanitized to a valid material name, e.g.ignored_paths→ignored-paths; a-<n>suffix disambiguates repeats). The exact input name is preserved in achainloop.material.policy_inputannotation.chainloop.material.referencesannotation (by material name, modeled on the OCI referrers API). The same primitive can connect other material kinds in the future.PolicyEvaluationgains aruntime_input_overridesfield listing which input names were supplied at runtime; the effective merged values remain inwith.pkg/tabularpackage (extracted from the previous sigcheck-only parser): BOM decoding, comma/tab auto-detection, and a case-insensitiveColumnextractor. The sigcheck material crafter now consumes it too. JSON accepts a bare string array, an array of string-valued objects, or an object mapping the column to an array.AI assistance
This change was developed with the assistance of Claude Code. Affected commits carry an
Assisted-by: Claude Codetrailer.🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri