Repository navigation
chore: Cherry-pick changes from upstream - #27
Conversation
|
📦 Target Release Version: 2.37.2 |
PR ReviewAction TypeNode-based action (runs on Passed Checks
Failed ChecksNone — all checklist items passed. Warnings
Security FindingsNo exploitable security vulnerabilities were introduced. This PR is primarily a security improvement that:
SummaryThis cherry-pick PR brings solid security hardening from upstream and all mandatory checklist items pass. The two warnings around the mutable |
| const pattern = strict | ||
| ? /[$`"';|&(){}[\]\\<>*?\n\r\t]/g | ||
| : /[$`"';|&(){}[\]\\\n\r\t]/g; | ||
| return value.replace(pattern, ''); |
There was a problem hiding this comment.
Warning: loose mode omits shell redirection and glob characters
In non-strict mode (the default), <, >, *, and ? are not removed. These characters can be exploited for shell redirection (>, <) or glob expansion (*, ?) in some invocation contexts.
Strict mode (used for extensions input) already strips these. Consider whether loose-mode callers — particularly tool version strings that flow into shell commands — are safe, or whether the loose pattern should also strip redirection/glob chars:
| return value.replace(pattern, ''); | |
| const pattern = strict | |
| ? /[$`"';|&(){}[\]\\<>*?\n\r\t]/g | |
| : /[$`"';|&(){}[\]\\<>*?\n\r\t]/g; |
| } | ||
| return fs | ||
| .readFileSync( | ||
| path.join(__dirname, '../src/configs/composer-gh-auth-no-op'), |
There was a problem hiding this comment.
Warning: silent failure if config file is missing
fs.readFileSync will throw if composer-gh-auth-no-op is not found at the expected path (e.g. after a layout change or during testing outside the action root). The uncaught exception would propagate and crash the action. Consider wrapping with a try/catch that logs a warning and returns false, or assert the file's existence with a clear error message:
if (!fs.existsSync(filePath)) {
core.warning('composer-gh-auth-no-op config not found; skipping composer auth check.');
return false;
}
🔍 Cherry-Pick Verification Report📦 Upstream Changes: 📋 File-by-File Analysis:
|
| export async function getManifestURLS(): Promise<string[]> { | ||
| return [ | ||
| 'https://raw.githubusercontent.com/step-security/setup-php/main/src/configs/php-versions.json', | ||
| 'https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/php-versions.json', |
There was a problem hiding this comment.
in cherry-pick we have examples folder, we have in main as well, but here we dont have
There was a problem hiding this comment.
Because we already have those changes that's why they're not present in this PR.
Signed-off-by: Anurag Rajawat <anurag@stepsecurity.io>
def5596 to
6062f6e
Compare
🔍 Cherry-Pick Verification Report📦 Upstream Changes: 📋 File-by-File Analysis:
|
shivammathur/setup-php@2.37.0...2.37.2