Compare commits

...

26 Commits

Author SHA1 Message Date
Tom Hu
a1ed4b322b Merge pull request #299 from codecov/pull-in-bash
Pull in bash script and bump to 1.5.0
2021-05-03 09:49:38 -04:00
Tom Hu
2332a737fb Update CHANGELOG 2021-04-29 17:44:11 -04:00
Tom Hu
dc56cf479e revert 2021-04-29 17:39:19 -04:00
Tom Hu
a5399823bb Ensure the right script 2021-04-29 17:36:42 -04:00
Tom Hu
9f471fc6f8 Pull in bash script 2021-04-29 17:33:25 -04:00
Tom Hu
062fb177ae Merge pull request #298 from codecov/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-04-29 17:29:41 -04:00
Tom Hu
31d2c8f775 Merge pull request #278 from codecov/dependabot/npm_and_yarn/typescript-eslint/parser-4.22.0
Bump @typescript-eslint/parser from 4.20.0 to 4.22.0
2021-04-29 17:04:08 -04:00
dependabot-preview[bot]
47ed2776b9 Bump @typescript-eslint/parser from 4.20.0 to 4.22.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.20.0 to 4.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-29 21:03:30 +00:00
Tom Hu
b37e21182f Update .github/dependabot.yml 2021-04-29 17:03:07 -04:00
Tom Hu
fd42ae77ab Merge pull request #293 from codecov/dependabot/npm_and_yarn/eslint-7.25.0
Bump eslint from 7.21.0 to 7.25.0
2021-04-29 17:01:51 -04:00
Tom Hu
998cb33cad Merge pull request #292 from codecov/dependabot/npm_and_yarn/ts-jest-26.5.5
Bump ts-jest from 26.5.3 to 26.5.5
2021-04-29 17:01:38 -04:00
dependabot-preview[bot]
052dc5d29d Bump eslint from 7.21.0 to 7.25.0
Bumps [eslint](https://github.com/eslint/eslint) from 7.21.0 to 7.25.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.21.0...v7.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-29 21:00:27 +00:00
dependabot-preview[bot]
3e2901753e Bump ts-jest from 26.5.3 to 26.5.5
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 26.5.3 to 26.5.5.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v26.5.3...v26.5.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-29 21:00:03 +00:00
Tom Hu
6b52f2a1d9 Merge pull request #297 from codecov/dependabot/npm_and_yarn/types/jest-26.0.23
Bump @types/jest from 26.0.20 to 26.0.23
2021-04-29 16:59:47 -04:00
Tom Hu
4789835c72 Merge pull request #279 from codecov/dependabot/npm_and_yarn/actions/core-1.2.7
Bump @actions/core from 1.2.6 to 1.2.7
2021-04-29 16:59:25 -04:00
Tom Hu
47b1f9735f Merge pull request #277 from codecov/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-4.22.0
Bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.22.0
2021-04-29 16:58:51 -04:00
Tom Hu
298ba60aef Merge pull request #271 from codecov/dependabot/npm_and_yarn/typescript-4.2.4
Bump typescript from 4.2.3 to 4.2.4
2021-04-29 16:58:22 -04:00
dependabot-preview[bot]
abf28f2040 Upgrade to GitHub-native Dependabot 2021-04-28 22:28:48 +00:00
dependabot-preview[bot]
cdc2a0ed57 Bump @types/jest from 26.0.20 to 26.0.23
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 26.0.20 to 26.0.23.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-28 06:58:50 +00:00
Tom Hu
967e2b38a8 Merge pull request #287 from codecov/update-validation-regex
Update validation regex, pull checksums into script, and bump to 1.4.1
2021-04-20 08:59:13 -04:00
Tom Hu
77a7b61cd5 Lint 2021-04-20 08:38:33 -04:00
Tom Hu
50895b2a6f Pull checksums into script 2021-04-20 08:35:56 -04:00
Tom Hu
95e6f30a60 Update validation regex and bump to 1.4.1 2021-04-19 21:23:35 -04:00
dependabot-preview[bot]
ae04cc96c3 Bump @actions/core from 1.2.6 to 1.2.7
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-14 07:07:49 +00:00
dependabot-preview[bot]
d2569b4d35 Bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.22.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.16.1 to 4.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.22.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-13 06:35:27 +00:00
dependabot-preview[bot]
216c5372a9 Bump typescript from 4.2.3 to 4.2.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-04-08 07:03:28 +00:00
11 changed files with 4272 additions and 53909 deletions

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

View File

@@ -1,3 +1,21 @@
## 1.5.0
### Features
- #299 Pull Codecov bash script into the action
### Dependencies
- #271 Bump typescript from 4.2.3 to 4.2.4
- #277 Bump @typescript-eslint/eslint-plugin from 4.16.1 to 4.22.0
- #278 Bump @typescript-eslint/parser from 4.20.0 to 4.22.0
- #279 Bump @actions/core from 1.2.6 to 1.2.7
- #292 Bump ts-jest from 26.5.3 to 26.5.5
- #293 Bump eslint from 7.21.0 to 7.25.0
- #297 Bump @types/jest from 26.0.20 to 26.0.23
- #298 Upgrade to GitHub-native Dependabot
## 1.4.1
### Fixes
- #287 Update VERSION regex to restrict on digits and dot and move checksums into script
## 1.4.0
### Features
- #282 Add checksum verification of bash script

1884
dist/codecov vendored Normal file

File diff suppressed because it is too large Load Diff

53898
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -4,5 +4,5 @@ npm i --package-lock-only
npm run lint --fix
npm run build
git add src/
git add dist/index.js
git add dist/
git add package-lock.json

296
package-lock.json generated
View File

@@ -1,13 +1,13 @@
{
"name": "codecov-action",
"version": "1.4.0",
"version": "1.5.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@actions/core": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz",
"integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA=="
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.7.tgz",
"integrity": "sha512-kzLFD5BgEvq6ubcxdgPbRKGD2Qrgya/5j+wh4LZzqT915I0V3rED+MvjH6NXghbvk1MXknpNNQ3uKjXSEN00Ig=="
},
"@actions/exec": {
"version": "1.0.4",
@@ -1195,9 +1195,9 @@
}
},
"@types/jest": {
"version": "26.0.20",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.20.tgz",
"integrity": "sha512-9zi2Y+5USJRxd0FsahERhBwlcvFh6D2GLQnY2FH2BzK8J9s9omvNHIbvABwIluXa0fD8XVKMLTO0aOEuUfACAA==",
"version": "26.0.23",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.23.tgz",
"integrity": "sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA==",
"requires": {
"jest-diff": "^26.0.0",
"pretty-format": "^26.0.0"
@@ -1243,13 +1243,13 @@
"integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw=="
},
"@typescript-eslint/eslint-plugin": {
"version": "4.16.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz",
"integrity": "sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==",
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.0.tgz",
"integrity": "sha512-U8SP9VOs275iDXaL08Ln1Fa/wLXfj5aTr/1c0t0j6CdbOnxh+TruXu1p4I0NAvdPBQgoPjHsgKn28mOi0FzfoA==",
"dev": true,
"requires": {
"@typescript-eslint/experimental-utils": "4.16.1",
"@typescript-eslint/scope-manager": "4.16.1",
"@typescript-eslint/experimental-utils": "4.22.0",
"@typescript-eslint/scope-manager": "4.22.0",
"debug": "^4.1.1",
"functional-red-black-tree": "^1.0.1",
"lodash": "^4.17.15",
@@ -1258,84 +1258,6 @@
"tsutils": "^3.17.1"
},
"dependencies": {
"semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
}
}
}
},
"@typescript-eslint/experimental-utils": {
"version": "4.16.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz",
"integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.3",
"@typescript-eslint/scope-manager": "4.16.1",
"@typescript-eslint/types": "4.16.1",
"@typescript-eslint/typescript-estree": "4.16.1",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
}
},
"@typescript-eslint/parser": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.20.0.tgz",
"integrity": "sha512-m6vDtgL9EABdjMtKVw5rr6DdeMCH3OA1vFb0dAyuZSa3e5yw1YRzlwFnm9knma9Lz6b2GPvoNSa8vOXrqsaglA==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "4.20.0",
"@typescript-eslint/types": "4.20.0",
"@typescript-eslint/typescript-estree": "4.20.0",
"debug": "^4.1.1"
},
"dependencies": {
"@typescript-eslint/scope-manager": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz",
"integrity": "sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.20.0",
"@typescript-eslint/visitor-keys": "4.20.0"
}
},
"@typescript-eslint/types": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.20.0.tgz",
"integrity": "sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz",
"integrity": "sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.20.0",
"@typescript-eslint/visitor-keys": "4.20.0",
"debug": "^4.1.1",
"globby": "^11.0.1",
"is-glob": "^4.0.1",
"semver": "^7.3.2",
"tsutils": "^3.17.1"
}
},
"@typescript-eslint/visitor-keys": {
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz",
"integrity": "sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.20.0",
"eslint-visitor-keys": "^2.0.0"
}
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
@@ -1347,30 +1269,56 @@
}
}
},
"@typescript-eslint/scope-manager": {
"version": "4.16.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz",
"integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==",
"@typescript-eslint/experimental-utils": {
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz",
"integrity": "sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.16.1",
"@typescript-eslint/visitor-keys": "4.16.1"
"@types/json-schema": "^7.0.3",
"@typescript-eslint/scope-manager": "4.22.0",
"@typescript-eslint/types": "4.22.0",
"@typescript-eslint/typescript-estree": "4.22.0",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
}
},
"@typescript-eslint/parser": {
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.0.tgz",
"integrity": "sha512-z/bGdBJJZJN76nvAY9DkJANYgK3nlRstRRi74WHm3jjgf2I8AglrSY+6l7ogxOmn55YJ6oKZCLLy+6PW70z15Q==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "4.22.0",
"@typescript-eslint/types": "4.22.0",
"@typescript-eslint/typescript-estree": "4.22.0",
"debug": "^4.1.1"
}
},
"@typescript-eslint/scope-manager": {
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.0.tgz",
"integrity": "sha512-OcCO7LTdk6ukawUM40wo61WdeoA7NM/zaoq1/2cs13M7GyiF+T4rxuA4xM+6LeHWjWbss7hkGXjFDRcKD4O04Q==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.22.0",
"@typescript-eslint/visitor-keys": "4.22.0"
}
},
"@typescript-eslint/types": {
"version": "4.16.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz",
"integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==",
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.0.tgz",
"integrity": "sha512-sW/BiXmmyMqDPO2kpOhSy2Py5w6KvRRsKZnV0c4+0nr4GIcedJwXAq+RHNK4lLVEZAJYFltnnk1tJSlbeS9lYA==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "4.16.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz",
"integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==",
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.0.tgz",
"integrity": "sha512-TkIFeu5JEeSs5ze/4NID+PIcVjgoU3cUQUIZnH3Sb1cEn1lBo7StSV5bwPuJQuoxKXlzAObjYTilOEKRuhR5yg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.16.1",
"@typescript-eslint/visitor-keys": "4.16.1",
"@typescript-eslint/types": "4.22.0",
"@typescript-eslint/visitor-keys": "4.22.0",
"debug": "^4.1.1",
"globby": "^11.0.1",
"is-glob": "^4.0.1",
@@ -1379,9 +1327,9 @@
},
"dependencies": {
"semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
@@ -1390,12 +1338,12 @@
}
},
"@typescript-eslint/visitor-keys": {
"version": "4.16.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz",
"integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==",
"version": "4.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.0.tgz",
"integrity": "sha512-nnMu4F+s4o0sll6cBSsTeVsT4cwxB7zECK3dFxzEjPBii9xLpq4yqqsy/FU5zMfan6G60DKZSCXAa3sHJZrcYw==",
"dev": true,
"requires": {
"@typescript-eslint/types": "4.16.1",
"@typescript-eslint/types": "4.22.0",
"eslint-visitor-keys": "^2.0.0"
}
},
@@ -2179,9 +2127,9 @@
}
},
"eslint": {
"version": "7.21.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz",
"integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==",
"version": "7.25.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.25.0.tgz",
"integrity": "sha512-TVpSovpvCNpLURIScDRB6g5CYu/ZFq9GfX2hLNIV4dSBKxIWojeDODvYl3t0k0VtMxYeR8OXPCFE5+oHMlGfhw==",
"dev": true,
"requires": {
"@babel/code-frame": "7.12.11",
@@ -2201,7 +2149,7 @@
"file-entry-cache": "^6.0.1",
"functional-red-black-tree": "^1.0.1",
"glob-parent": "^5.0.0",
"globals": "^12.1.0",
"globals": "^13.6.0",
"ignore": "^4.0.6",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
@@ -2209,7 +2157,7 @@
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
"lodash": "^4.17.20",
"lodash": "^4.17.21",
"minimatch": "^3.0.4",
"natural-compare": "^1.4.0",
"optionator": "^0.9.1",
@@ -2244,12 +2192,12 @@
}
},
"globals": {
"version": "12.4.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
"integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz",
"integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==",
"dev": true,
"requires": {
"type-fest": "^0.8.1"
"type-fest": "^0.20.2"
}
},
"ignore": {
@@ -2301,9 +2249,9 @@
"dev": true
},
"semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
@@ -2333,6 +2281,12 @@
"prelude-ls": "^1.2.1"
}
},
"type-fest": {
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"dev": true
},
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@@ -4861,11 +4815,29 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
},
"lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
"dev": true
},
"lodash.flatten": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz",
"integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=",
"dev": true
},
"lodash.sortby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
},
"lodash.truncate": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
"integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
"dev": true
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@@ -5359,9 +5331,9 @@
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"react-is": {
"version": "17.0.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz",
"integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA=="
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
},
"read-pkg": {
"version": "5.2.0",
@@ -5488,16 +5460,6 @@
}
}
},
"requestretry": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/requestretry/-/requestretry-5.0.0.tgz",
"integrity": "sha512-Rx0ETW0O1K+PAL/w8XVE2yhBCEtEsu6H690qbyCBT9mAHetXaO3BQ5hO5QGGkawTu9jG29ErmfqJZwX+dUy4tw==",
"requires": {
"extend": "^3.0.2",
"lodash": "^4.17.15",
"when": "^3.7.7"
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -6116,21 +6078,24 @@
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
},
"table": {
"version": "6.0.7",
"resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
"integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/table/-/table-6.6.0.tgz",
"integrity": "sha512-iZMtp5tUvcnAdtHpZTWLPF0M7AgiQsURR2DwmxnJwSy8I3+cY+ozzVvYha3BOLG2TB+L0CqjIz+91htuj6yCXg==",
"dev": true,
"requires": {
"ajv": "^7.0.2",
"lodash": "^4.17.20",
"ajv": "^8.0.1",
"lodash.clonedeep": "^4.5.0",
"lodash.flatten": "^4.4.0",
"lodash.truncate": "^4.4.2",
"slice-ansi": "^4.0.0",
"string-width": "^4.2.0"
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0"
},
"dependencies": {
"ajv": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz",
"integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.2.0.tgz",
"integrity": "sha512-WSNGFuyWd//XO8n/m/EaOlNLtO0yL8EXT/74LqT4khdhpZjP7lkj/kT5uwRmGitKEVp/Oj7ZUHeGfPtgHhQ5CA==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -6150,12 +6115,6 @@
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
}
}
},
@@ -6255,9 +6214,9 @@
}
},
"ts-jest": {
"version": "26.5.3",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.3.tgz",
"integrity": "sha512-nBiiFGNvtujdLryU7MiMQh1iPmnZ/QvOskBbD2kURiI1MwqvxlxNnaAB/z9TbslMqCsSbu5BXvSSQPc5tvHGeA==",
"version": "26.5.5",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.5.tgz",
"integrity": "sha512-7tP4m+silwt1NHqzNRAPjW1BswnAhopTdc2K3HEkRZjF0ZG2F/e/ypVH0xiZIMfItFtD3CX0XFbwPzp9fIEUVg==",
"requires": {
"bs-logger": "0.x",
"buffer-from": "1.x",
@@ -6272,17 +6231,17 @@
},
"dependencies": {
"semver": {
"version": "7.3.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz",
"integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==",
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"yargs-parser": {
"version": "20.2.6",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.6.tgz",
"integrity": "sha512-AP1+fQIWSM/sMiET8fyayjx/J+JmTPt2Mr0FkrgqB4todtfa53sOsrSAcIrJRD5XS20bKUwaDIuMkWKCEiQLKA=="
"version": "20.2.7",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz",
"integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw=="
}
}
},
@@ -6346,9 +6305,9 @@
}
},
"typescript": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
"integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw=="
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz",
"integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg=="
},
"union-value": {
"version": "1.0.1",
@@ -6426,9 +6385,9 @@
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
},
"v8-compile-cache": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz",
"integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
"integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
"dev": true
},
"v8-to-istanbul": {
@@ -6519,11 +6478,6 @@
"webidl-conversions": "^6.1.0"
}
},
"when": {
"version": "3.7.8",
"resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
"integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I="
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "codecov-action",
"version": "1.4.0",
"version": "1.5.0",
"description": "Upload coverage reports to Codecov from GitHub Actions",
"main": "index.js",
"scripts": {
@@ -23,24 +23,23 @@
},
"homepage": "https://github.com/codecov/codecov-action#readme",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/core": "^1.2.7",
"@actions/exec": "^1.0.4",
"@actions/github": "^4.0.0",
"@types/jest": "^26.0.20",
"@types/jest": "^26.0.23",
"@zeit/ncc": "^0.22.3",
"fs": "0.0.1-security",
"jest": "^26.6.3",
"jest-junit": "^12.0.0",
"request": "^2.88.2",
"requestretry": "^5.0.0",
"ts-jest": "^26.5.3",
"typescript": "^4.2.3",
"ts-jest": "^26.5.5",
"typescript": "^4.2.4",
"yarn": "^1.22.10"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.20.0",
"eslint": "^7.21.0",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"eslint": "^7.25.0",
"eslint-config-google": "^0.14.0"
}
}

1884
src/codecov Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,73 +2,45 @@ const core = require('@actions/core');
const exec = require('@actions/exec');
const fs = require('fs');
const request = require('requestretry');
import buildExec from './buildExec';
import validateUploader from './validate';
const codecovScript = fs.readFileSync(__dirname + '/codecov');
let failCi;
try {
request({
json: false,
maxAttempts: 10,
timeout: 3000,
url: 'https://codecov.io/bash',
}, async (error, response, body) => {
const {execArgs, options, filepath, failCi} = buildExec();
const {execArgs, options, filepath, failCi} = buildExec();
try {
const isValid = await validateUploader(body);
if (!isValid) {
const failure = 'Codecov failure: ' +
'Bash script checksums do not match published values. ' +
'Please contact security@codecov.io immediately.';
core.setFailed(failure);
throw new Error(failure);
}
fs.writeFile(filepath, codecovScript, (err) => {
if (err && failCi) {
throw err;
} else if (err) {
core.warning(`Codecov warning: ${err.message}`);
}
if (error && failCi) {
throw error;
} else if (error) {
core.warning(`Codecov warning: ${error.message}`);
}
exec.exec('bash', execArgs, options)
.catch((err) => {
if (failCi) {
core.setFailed(
`Codecov failed with the following error: ${err.message}`,
);
} else {
core.warning(`Codecov warning: ${err.message}`);
}
})
.then(() => {
unlinkFile();
});
fs.writeFile(filepath, body, (err) => {
const unlinkFile = () => {
fs.unlink(filepath, (err) => {
if (err && failCi) {
throw err;
} else if (err) {
core.warning(`Codecov warning: ${err.message}`);
}
exec.exec('bash', execArgs, options)
.catch((err) => {
if (failCi) {
core.setFailed(
`Codecov failed with the following error: ${err.message}`,
);
} else {
core.warning(`Codecov warning: ${err.message}`);
}
})
.then(() => {
unlinkFile();
});
const unlinkFile = () => {
fs.unlink(filepath, (err) => {
if (err && failCi) {
throw err;
} else if (err) {
core.warning(`Codecov warning: ${err.message}`);
}
});
};
});
} catch (error) {
core.setFailed(
`Codecov failed with the following error: ${error.message}`,
);
}
};
});
} catch (error) {
if (failCi) {

View File

@@ -1,39 +0,0 @@
import validateUploader, {retrieveChecksum} from './validate';
const request = require('requestretry');
const bashScript = (async () => {
try {
const script = await request({
json: false,
maxAttempts: 10,
timeout: 3000,
url: 'https://codecov.io/bash',
});
return script.body;
} catch (err) {
throw err;
}
});
test('valid checksums', async () => {
const valid = await validateUploader(await bashScript());
expect(valid).toBeTruthy();
});
test('invalid checksums', async () => {
const script = await bashScript();
const valid = await validateUploader(script.substring(0, script.length - 1));
expect(valid).toBeFalsy();
});
test('invalid script version', async () => {
const script = await bashScript();
const valid = await validateUploader(script.substring(0, 20));
expect(valid).toBeFalsy();
});
test('invalid public checksum file', async () => {
const checksum = await retrieveChecksum('foo', 'bar');
expect(checksum).toBeFalsy();
});

View File

@@ -1,58 +0,0 @@
const crypto = require('crypto');
const core = require('@actions/core');
const request = require('requestretry');
const validateUploader = async (body) => {
const version = getVersion(body);
if (version === null) {
core.warning('Codecov could not identify the bash uploader version.');
return false;
}
for (const i of [1, 256, 512]) {
const publicChecksum = await retrieveChecksum(version, i);
const uploaderChecksum = calculateChecksum(body, i);
if (uploaderChecksum !== publicChecksum.trim()) {
core.warning(
`Codecov ${version} checksums for SHA${i} failed to match.\n` +
`Public checksum: ${publicChecksum}` +
`Uploader checksum: ${uploaderChecksum}`,
);
return false;
}
}
return true;
};
export const retrieveChecksum = async (version, encryption) => {
const url = `https://raw.githubusercontent.com/codecov/codecov-bash/${version}/SHA${encryption}SUM`;
const response = await request({
maxAttempts: 10,
timeout: 3000,
url: url,
});
if (response.statusCode != 200) {
core.warning(
`Codecov could not retrieve checksum SHA${encryption} at ${url}`,
);
return '';
}
return response.body;
};
const calculateChecksum = (body, i) => {
const shasum = crypto.createHash(`sha${i}`);
shasum.update(body);
return `${shasum.digest('hex')} codecov`;
};
const getVersion = (body) => {
const regex = /VERSION="(.*)+"/g;
const match = regex.exec(body);
return match ? match[1] : null;
};
export default validateUploader;