Override semver version to 7.5.3 GHSA-c2qf-rxjj-qqgw/CVE-2022-25883

This commit is contained in:
Shivam Mathur 2023-07-02 02:34:06 +05:30
parent f1cc14e3d5
commit 394503cb8a
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 669 additions and 693 deletions

5
dist/index.js vendored
View File

@ -4473,6 +4473,10 @@ function copyFile(srcFile, destFile, force) {
if (range.includes('||')) { if (range.includes('||')) {
return range.split('||').some((r) => satisfies(version, r)); return range.split('||').some((r) => satisfies(version, r));
} }
else if (range.includes(' - ')) {
const [a, b] = range.split(' - ', 2);
return satisfies(version, `>=${a} <=${b}`);
}
else if (range.includes(' ')) { else if (range.includes(' ')) {
return range return range
.trim() .trim()
@ -4554,6 +4558,7 @@ function copyFile(srcFile, destFile, force) {
'=': [0], '=': [0],
'<=': [-1, 0], '<=': [-1, 0],
'<': [-1], '<': [-1],
'!=': [-1, 1],
}; };
const allowedOperators = Object.keys(operatorResMap); const allowedOperators = Object.keys(operatorResMap);
const assertValidOperator = (op) => { const assertValidOperator = (op) => {

1340
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -37,15 +37,15 @@
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1", "@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3", "@actions/io": "^1.1.3",
"compare-versions": "^6.0.0-rc.1" "compare-versions": "^6.0.0-rc.2"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.2", "@types/jest": "^29.5.2",
"@types/node": "^20.3.1", "@types/node": "^20.3.3",
"@typescript-eslint/eslint-plugin": "^5.60.0", "@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.0", "@typescript-eslint/parser": "^5.60.1",
"@vercel/ncc": "^0.36.1", "@vercel/ncc": "^0.36.1",
"eslint": "^8.43.0", "eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0", "eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5", "eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.2", "eslint-plugin-jest": "^27.2.2",
@ -55,8 +55,11 @@
"nock": "^13.3.1", "nock": "^13.3.1",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"simple-git-hooks": "^2.8.1", "simple-git-hooks": "^2.8.1",
"ts-jest": "^29.1.0", "ts-jest": "^29.1.1",
"typescript": "^5.1.3" "typescript": "^5.1.6"
},
"overrides": {
"semver": "7.5.3"
}, },
"bugs": { "bugs": {
"url": "https://github.com/shivammathur/setup-php/issues" "url": "https://github.com/shivammathur/setup-php/issues"