feat(artifacts): surface activation context and inventory - #747
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: David Slater <12449447+davidslater@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds bounded activation context and recursive artifact inventory observability.
Changes:
- Parses allowlisted
aw_info.jsonmetadata as untrusted prompt context. - Logs all artifact files and writes an Actions summary table.
- Aligns specifications, documentation, and tests.
Show a summary per file
| File | Description |
|---|---|
pkg/artifacts/artifacts.go |
Loads activation context and builds inventory. |
pkg/artifacts/artifacts_test.go |
Tests parsing, limits, and inventory. |
pkg/detector/detector.go |
Renders activation context. |
pkg/detector/static.go |
Classifies context as untrusted. |
pkg/detector/prompts/threat_detection.md |
Adds activation-context guidance. |
pkg/detector/detector_test.go |
Tests prompt inclusion. |
pkg/stepsummary/stepsummary.go |
Writes the inventory summary table. |
cmd/threat-detect/main.go |
Logs and summarizes inventory. |
cmd/threat-detect/logfile_test.go |
Tests logging and summary failures. |
specs/threat-detection-spec.md |
Defines activation and inventory requirements. |
specs/usage-spec.md |
Documents host integration. |
README.md |
Updates user-facing artifact behavior. |
DEVGUIDE.md |
Updates developer guidance. |
CLAUDE.md |
Updates repository agent guidance. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 14/14 changed files
- Comments generated: 1
- Review effort level: Balanced
Comment on lines
+55
to
+60
| replacer := strings.NewReplacer( | ||
| "\\", "\\\\", | ||
| "|", "\\|", | ||
| "\r", "\\r", | ||
| "\n", "\\n", | ||
| ) |
…ection Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: David Slater <12449447+davidslater@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: David Slater <12449447+davidslater@users.noreply.github.com>
davidslater
added a commit
that referenced
this pull request
Aug 4, 2026
main's #747 introduced a TD-20c (append the artifact inventory to GITHUB_STEP_SUMMARY) while this branch had already defined TD-20c for the conclude diagnostics — two different normative requirements under one ID. main's TD-20c keeps the ID since it is already published; the conclude diagnostics requirement is renumbered to TD-20d, and the U-18a cross-reference in specs/usage-spec.md is updated to match. The unrelated TD-20c reference at U-09 (step-summary inventory) is intentionally left pointing at TD-20c. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: David Slater <12449447+davidslater@users.noreply.github.com>
This was referenced Aug 5, 2026
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.
Summary
aw_info.jsonas explicitly untrusted activation contextexperiments/andcomment-memory/as inventory-only inputs and align the specificationsValidation
make fmt lint build testmake security-govulncheckCloses #704