Skip to content

fix: allow package.json/lock in dep security monitor PRs#2041

Merged
lpcox merged 1 commit intomainfrom
copilot/fix-dep-security-allowed-files
Apr 16, 2026
Merged

fix: allow package.json/lock in dep security monitor PRs#2041
lpcox merged 1 commit intomainfrom
copilot/fix-dep-security-allowed-files

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented Apr 16, 2026

The Dependency Security Monitor workflow failed because create-pull-request safe-outputs tried to modify package-lock.json, which is in the compiler's default protected_files list.

Changes:

  • Add allowed-files: [package.json, package-lock.json] to create-pull-request config — these files are legitimately modified when bundling dependency updates
  • Add protected-files: fallback-to-issue as safety net — if the agent tries to modify other protected files (e.g., .github/ paths, CODEOWNERS), it creates a review issue instead of hard-failing

Root cause: Run 24530903368 failed at safe_outputs with:

Cannot create pull request: patch modifies protected files (package-lock.json).

Recompiled lock file and ran post-processing.

The workflow's safe-outputs create-pull-request was blocked by
the compiler's default protected_files list which includes
package-lock.json. Add allowed-files for package.json and
package-lock.json, and set protected-files: fallback-to-issue
as a safety net for any other protected file modifications.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 16, 2026 23:30
@lpcox lpcox requested a review from Mossaka as a code owner April 16, 2026 23:30
@github-actions
Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 84.33% 84.41% 📈 +0.08%
Statements 83.56% 83.64% 📈 +0.08%
Functions 87.39% 87.39% ➡️ +0.00%
Branches 74.78% 74.82% 📈 +0.04%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 86.8% → 87.1% (+0.30%) 86.4% → 86.7% (+0.29%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results

Overall: PASS

💥 [THE END] — Illustrated by Smoke Claude

@github-actions
Copy link
Copy Markdown
Contributor

🔥 Smoke Test: Copilot BYOK (Offline) — PASS

Test Result
GitHub MCP (list merged PRs) ✅ PR #2041: "fix: allow package.json/lock in dep security monitor PRs"
GitHub.com connectivity
File write/read
BYOK inference (agent → api-proxy → api.githubcopilot.com)

Running in BYOK offline mode (COPILOT_OFFLINE=true) via api-proxy → api.githubcopilot.com

cc @lpcox

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions
Copy link
Copy Markdown
Contributor

🔥 Smoke Test: OpenCode — PASS

  • ✅ GitHub MCP: reviewed last 2 merged PRs (#2036, #2018)
  • ✅ File write: /tmp/gh-aw/agent/smoke-test-opencode-24539424021.txt created and verified
  • ✅ Bash tool: file read back successfully
  • ✅ Build AWF: npm ci && npm run build succeeded

Overall: PASS

🌐 Transmitted by Smoke OpenCode

@github-actions
Copy link
Copy Markdown
Contributor

✅ Copilot Smoke Test: PASS

  • ✅ MCP GitHub connectivity: Retrieved merged PR "fix: make smoke-claude safe outputs trigger-aware for workflow_dispatch"
  • ✅ GitHub.com connectivity: HTTP 200
  • ✅ File write/read: Verified at /tmp/gh-aw/agent/smoke-test-copilot-24539423991.txt

All tests passed. cc @lpcox

📰 BREAKING: Report filed by Smoke Copilot

@github-actions
Copy link
Copy Markdown
Contributor

Smoke test summary:
PR titles:

  • fix: make smoke-claude safe outputs trigger-aware for workflow_dispatch
  • feat: add AWF JSON/YAML config ingestion with schema validation and CLI precedence
  1. GitHub MCP merged PR review: ✅
  2. safeinputs-gh PR query: ❌
  3. Playwright GitHub title contains "GitHub": ✅
  4. Tavily search returned results: ❌
  5. File write test: ✅
  6. Bash cat verification: ✅
  7. Discussion query + oracle comment: ❌
  8. npm ci && npm run build: ✅
    Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test: GitHub Actions Services Connectivity

Check Status Detail
Redis PING (host.docker.internal:6379) ✅ Pass +PONG
PostgreSQL ready (host.docker.internal:5432) ✅ Pass accepting connections
PostgreSQL SELECT 1 (smoketest db) ✅ Pass returned 1

All 3 checks passed.

Note: redis-cli was unavailable (apt not functional in this environment), so Redis was tested via raw TCP using Node.js — response was +PONG confirming the server is up.

🔌 Service connectivity validated by Smoke Services

@github-actions
Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A ✅ PASS
.NET json-parse N/A ✅ PASS
Go color passed ✅ PASS
Go env passed ✅ PASS
Go uuid passed ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine 1/1 passed ✅ PASS
Node.js clsx all passed ✅ PASS
Node.js execa all passed ✅ PASS
Node.js p-limit all passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Generated by Build Test Suite for issue #2041 · ● 702.5K ·

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Dependency Security Monitor agentic workflow so dependency update PRs can include package.json and package-lock.json changes without failing safe-outputs, while adding a fallback policy for attempts to modify other protected files.

Changes:

  • Allow package.json and package-lock.json in safe-outputs.create-pull-request.
  • Configure protected-file handling to fallback-to-issue instead of hard-failing.
  • Recompile/regenerate the workflow lock file to reflect the new safe-outputs configuration (and updated generated tooling metadata).
Show a summary per file
File Description
.github/workflows/dependency-security-monitor.md Adds allowed-files and sets protected-files handling policy for safe-outputs PR creation.
.github/workflows/dependency-security-monitor.lock.yml Regenerates the compiled workflow, embedding the updated safe-outputs config and refreshed generated pins/metadata.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

"on":
schedule:
- cron: "33 19 * * *"
- cron: "18 23 * * *"
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

The generated lock workflow changes the scheduled cron time ("33 19" -> "18 23"). Even if this is a side-effect of recompilation, it changes when dependency monitoring runs and could affect vulnerability detection latency; consider keeping the previous cron value stable (or explicitly documenting that schedule time will shift on recompiles).

Suggested change
- cron: "18 23 * * *"
- cron: "33 19 * * *"

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +2
# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"43dc3b26ba9f321a89ba02e8db987efce53088afcc6293f16e4d574264ebf39e","compiler_version":"v0.68.4","strict":true,"agent_id":"copilot"}
# gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"57583dfa129051b855aa5d750d36fbeb8a885579","version":"v0.68.4"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.21"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.21"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.21"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.2.19"},{"image":"ghcr.io/github/github-mcp-server:v0.32.0"},{"image":"node:lts-alpine"}]}
Copy link

Copilot AI Apr 16, 2026

Choose a reason for hiding this comment

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

This lock file recompilation bumps the gh-aw compiler/actions/tooling versions (e.g., compiler_version v0.68.1 -> v0.68.4, new container image tags, updated action SHAs), which is a functional workflow change beyond the safe-outputs allowlist tweak. If the version bump isn’t required for allowed-files support, consider keeping the previous compiler/tooling versions and doing upgrades in a separate PR to reduce rollout risk.

Copilot uses AI. Check for mistakes.
@lpcox lpcox merged commit f2739d9 into main Apr 16, 2026
62 of 64 checks passed
@lpcox lpcox deleted the copilot/fix-dep-security-allowed-files branch April 16, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants