Repository navigation
[log] add debug logging to authorization compiler - #79408
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Debug logging emits unescaped workflow action names, allowing crafted names to inject attacker-controlled log lines or Actions annotations.
1 open issue
What changed in this PR
Adds debug logging to gh-aw’s read-only authorization verification compiler to help diagnose snapshot compilation.
Changes:
- Introduces the
workflow:authorization_compilerlogger. - Logs compiler creation, compilation entry, selected rejection reasons, and successful compilation statistics.
| File | Description |
|---|---|
pkg/workflow/authorization_compiler.go |
Adds debug logging around authorization snapshot compilation and metadata validation. |
Review effort: Max (adaptive)
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "2aacbb923e2759391aaf999e7ba3625cb2d2dc3f",
"kind": "requested",
"schema_version": "1",
"state": "b2f31cd78f0b74e8e6e5a86cd1635d3fad9c49ca485396649199029b4a965830",
"work": [
"83fe93dea6764216938ebf5c8049518964db2b9a379d0c92f18504b85eb87f8a"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|

Summary
Adds debug logging to
pkg/workflow/authorization_compiler.go, the only file I found with real logic and no logging.authorizationCompilerLog = logger.New("workflow:authorization_compiler")len()calls, so they have no side effects. Nothing logged is secret.Why only one file
The pre-flight
manifest.jsonwas stale. It lists files that lack their ownlogger.New(...)declaration, but nearly all of them already log through a package-level logger declared in a sibling file. Examples arepkg/actionpins/*.go,pkg/agentdrain/*.go,pkg/atif/*.go, and mostpkg/cli/add_*.go. Adding calls there would duplicate existing logs.The remaining unlogged entries are trivial (
types.go,config.go) or already have a declared logger with no logic (add_package_manifest.go). I did not scanpkg/broadly, so the file count is below the 5-file maximum.Validation
make build && make fmtpassed. I did not run the unit tests; this is a logging-only change.Follow-up
The manifest generator should check for package-level loggers, not only per-file
logger.Newdeclarations.🤖 Generated with [Claude Code]((claude.com/redacted)