Add Node.js setup step to CredSweeper shared workflow #2914
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.
The CredSweeper shared workflow creates a
mask-secrets.jsscript that requires Node.js, but was missing the setup step, causing silent failures in workflows that imported it (e.g., daily-news run #18984795622).Changes
Created
.github/workflows/shared/credsweeper.mdactions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903mask-secrets.jsutility script with Node.js core module dependencies (fs,path,@actions/core)node /tmp/gh-aw/credsweeper/mask-secrets.js *andcredsweeper *Updated
.github/workflows/daily-news.mdshared/credsweeper.mdConfiguration
Fixes the workflow execution path described in the issue where the agent never executed due to missing Node.js runtime.
Original prompt
This section details on the original issue you should resolve
<issue_title>[q] Fix Samsung CredSweeper shared workflow - add Node.js setup step</issue_title>
<issue_description># Q Workflow Optimization Report
Issues Found (from live data)
daily-news workflow (Run githubnext/gh-aw#18984795622)
Workflow Run: https://github.com/githubnext/gh-aw/actions/runs/18984795622/job/54225882260
Log Analysis: The workflow failed because the Copilot agent never executed. The logs show:
Log path not found: /tmp/gh-aw/.copilot/logs/Root Cause: The shared workflow
credsweeper.mdadded in PR #2888 creates a JavaScript file (mask-secrets.js) that needs to be executed with Node.js. However, the workflow was missing the Node.js setup step, which caused the compilation or execution to fail.Evidence from PR #2888:
Setup Node.jsstep was added:actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903withnode-version: '24'- "node /tmp/gh-aw/credsweeper/mask-secrets.js *"in the bash toolsfs,path,@actions/core)Changes Made
.github/workflows/shared/credsweeper.md (NEW FILE)
Added missing Node.js setup step:
Why this fixes the issue:
/tmp/gh-aw/credsweeper/mask-secrets.jswhich is a Node.js scriptnode /tmp/gh-aw/credsweeper/mask-secrets.js *.github/workflows/daily-news.md
Added import to enable CredSweeper in the daily-news workflow:
Expected Improvements
Validation
The changes follow the exact pattern from PR #2888's lock file, which shows the Node.js setup step was intended to be included. This fix adds it to the source markdown file so it will be properly compiled into the lock file.
Note: Lock files will be generated automatically after merge per repository workflow.
References
Related to PR: #2888
Investigated workflow run: 18984795622
Fix applies to: Samsung CredSweeper shared workflow configuration
Show patch preview (500 of 527 lines)