Skip to content

[log] add debug logging to authorization compiler - #79408

Merged
pelikhan merged 2 commits into
mainfrom
log/authorization-compiler-debug-logging-55d55c46e5a52fe2
Nov 20, 2026
Merged

pelikhan merged 2 commits into
mainfrom
log/authorization-compiler-debug-logging-55d55c46e5a52fe2

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds debug logging to pkg/workflow/authorization_compiler.go, the only file I found with real logic and no logging.

  • Logger: authorizationCompilerLog = logger.New("workflow:authorization_compiler")
  • Logs construction of the verification compiler.
  • Logs snapshot compilation entry, each rejection path (misconfigured compiler, source outside the candidate root, unpinned actions, remote safe-output action without inline inputs) and the successful result.
  • Log arguments are plain values or len() calls, so they have no side effects. Nothing logged is secret.

Why only one file

The pre-flight manifest.json was stale. It lists files that lack their own logger.New(...) declaration, but nearly all of them already log through a package-level logger declared in a sibling file. Examples are pkg/actionpins/*.go, pkg/agentdrain/*.go, pkg/atif/*.go, and most pkg/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 scan pkg/ broadly, so the file count is below the 5-file maximum.

Validation

make build && make fmt passed. 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.New declarations.

🤖 Generated with [Claude Code]((claude.com/redacted)

Generated by 📝 Go Logger Enhancement · claude · routed: sonnet55 high · ~38 AIC · ⌖ ~2 AIC · ⊞ 4.6K · ◷

  • expires on Nov 21, 2026, 7:24 PM UTC-08:00

@github-actions github-actions Bot added automation enhancement New feature or request labels Nov 20, 2026
Copilot AI adaptive review requested due to automatic review settings November 20, 2026 03:24
@github-actions github-actions Bot added enhancement New feature or request automation labels Nov 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_compiler logger.
  • 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)

Comment thread pkg/workflow/authorization_compiler.go Resolved
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/authorization_compiler.go:98): address unresolved feedback - Review comment

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

Copilot AI commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

main was already an ancestor; make merge-main completed successfully. The action name is now escaped with %q. Commit: 16939886.

Copilot AI requested a review from gh-aw-bot November 20, 2026 04:32
@pelikhan
pelikhan merged commit 3c54e83 into main Nov 20, 2026
65 checks passed
@pelikhan
pelikhan deleted the log/authorization-compiler-debug-logging-55d55c46e5a52fe2 branch November 20, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants