Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
429e2ac7fe |
@@ -10,7 +10,7 @@ updates:
|
|||||||
- minor
|
- minor
|
||||||
- patch
|
- patch
|
||||||
ignore:
|
ignore:
|
||||||
- dependency-name: 'actions/attest-sbom'
|
- dependency-name: "actions/attest-sbom"
|
||||||
|
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
directory: /
|
directory: /
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Lint Codebase
|
- name: Lint Codebase
|
||||||
id: super-linter
|
id: super-linter
|
||||||
uses: super-linter/super-linter/slim@v7
|
uses: super-linter/super-linter/slim@v6
|
||||||
env:
|
env:
|
||||||
DEFAULT_BRANCH: main
|
DEFAULT_BRANCH: main
|
||||||
FILTER_REGEX_EXCLUDE: dist/**/*
|
FILTER_REGEX_EXCLUDE: dist/**/*
|
||||||
@@ -46,5 +46,5 @@ jobs:
|
|||||||
TYPESCRIPT_DEFAULT_STYLE: prettier
|
TYPESCRIPT_DEFAULT_STYLE: prettier
|
||||||
VALIDATE_ALL_CODEBASE: true
|
VALIDATE_ALL_CODEBASE: true
|
||||||
VALIDATE_JAVASCRIPT_STANDARD: false
|
VALIDATE_JAVASCRIPT_STANDARD: false
|
||||||
VALIDATE_TYPESCRIPT_STANDARD: false
|
|
||||||
VALIDATE_JSCPD: false
|
VALIDATE_JSCPD: false
|
||||||
|
VALIDATE_GITHUB_ACTIONS: false
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ initiated.
|
|||||||
Attestations can be verified using the [`attestation` command in the GitHub
|
Attestations can be verified using the [`attestation` command in the GitHub
|
||||||
CLI][7].
|
CLI][7].
|
||||||
|
|
||||||
See [Using artifact attestations to establish provenance for builds][11] for
|
See [Using artifact attestations to establish provenance for builds][11]
|
||||||
more information on artifact attestations.
|
for more information on artifact attestations.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -63,8 +63,7 @@ See [action.yml](action.yml)
|
|||||||
- uses: actions/attest-sbom@v1
|
- uses: actions/attest-sbom@v1
|
||||||
with:
|
with:
|
||||||
# Path to the artifact serving as the subject of the attestation. Must
|
# Path to the artifact serving as the subject of the attestation. Must
|
||||||
# specify exactly one of "subject-path" or "subject-digest". May contain a
|
# specify exactly one of "subject-path" or "subject-digest".
|
||||||
# glob pattern or list of paths (total subject count cannot exceed 2500).
|
|
||||||
subject-path:
|
subject-path:
|
||||||
|
|
||||||
# SHA256 digest of the subject for the attestation. Must be in the form
|
# SHA256 digest of the subject for the attestation. Must be in the form
|
||||||
@@ -77,8 +76,8 @@ See [action.yml](action.yml)
|
|||||||
# path.
|
# path.
|
||||||
subject-name:
|
subject-name:
|
||||||
|
|
||||||
# Path to the JSON-formatted SBOM file to attest. File size cannot exceed
|
# Path to the JSON-formatted SBOM file to attest. When specified, the
|
||||||
# 16MB.
|
# "scan-path" and "sbom-format" inputs are ignored.
|
||||||
sbom-path:
|
sbom-path:
|
||||||
|
|
||||||
# Whether to push the attestation to the image registry. Requires that the
|
# Whether to push the attestation to the image registry. Requires that the
|
||||||
@@ -86,10 +85,6 @@ See [action.yml](action.yml)
|
|||||||
# the "subject-digest" parameter be specified. Defaults to false.
|
# the "subject-digest" parameter be specified. Defaults to false.
|
||||||
push-to-registry:
|
push-to-registry:
|
||||||
|
|
||||||
# Whether to attach a list of generated attestations to the workflow run
|
|
||||||
# summary page. Defaults to true.
|
|
||||||
show-summary:
|
|
||||||
|
|
||||||
# The GitHub token used to make authenticated API requests. Default is
|
# The GitHub token used to make authenticated API requests. Default is
|
||||||
# ${{ github.token }}
|
# ${{ github.token }}
|
||||||
github-token:
|
github-token:
|
||||||
@@ -111,19 +106,6 @@ If multiple subjects are being attested at the same time, each attestation will
|
|||||||
be written to the output file on a separate line (using the [JSON Lines][9]
|
be written to the output file on a separate line (using the [JSON Lines][9]
|
||||||
format).
|
format).
|
||||||
|
|
||||||
## Attestation Limits
|
|
||||||
|
|
||||||
### Subject Limits
|
|
||||||
|
|
||||||
No more than 2500 subjects can be attested at the same time. Subjects will be
|
|
||||||
processed in batches 50. After the initial group of 50, each subsequent batch
|
|
||||||
will incur an exponentially increasing amount of delay (capped at 1 minute of
|
|
||||||
delay per batch) to avoid overwhelming the attestation API.
|
|
||||||
|
|
||||||
### SBOM Limits
|
|
||||||
|
|
||||||
The SBOM supplied via the `sbom-path` input cannot exceed 16MB.
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Identify Subject and SBOM by Path
|
### Identify Subject and SBOM by Path
|
||||||
@@ -162,7 +144,7 @@ jobs:
|
|||||||
sbom-path: 'sbom.spdx.json'
|
sbom-path: 'sbom.spdx.json'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Identify Multiple Subjects
|
### Identify Subjects by Wildcard
|
||||||
|
|
||||||
If you are generating multiple artifacts, you can generate an attestation for
|
If you are generating multiple artifacts, you can generate an attestation for
|
||||||
each by using a wildcard in the `subject-path` input.
|
each by using a wildcard in the `subject-path` input.
|
||||||
@@ -177,23 +159,6 @@ each by using a wildcard in the `subject-path` input.
|
|||||||
For supported wildcards along with behavior and documentation, see
|
For supported wildcards along with behavior and documentation, see
|
||||||
[@actions/glob][10] which is used internally to search for files.
|
[@actions/glob][10] which is used internally to search for files.
|
||||||
|
|
||||||
Alternatively, you can explicitly list multiple subjects with either a comma or
|
|
||||||
newline delimited list:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/attest-sbom@v1
|
|
||||||
with:
|
|
||||||
subject-path: 'dist/foo, dist/bar'
|
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- uses: actions/attest-sbom@v1
|
|
||||||
with:
|
|
||||||
subject-path: |
|
|
||||||
dist/foo
|
|
||||||
dist/bar
|
|
||||||
```
|
|
||||||
|
|
||||||
### Container Image
|
### Container Image
|
||||||
|
|
||||||
When working with container images you can invoke the action with the
|
When working with container images you can invoke the action with the
|
||||||
@@ -269,5 +234,4 @@ jobs:
|
|||||||
https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto
|
https://github.com/sigstore/protobuf-specs/blob/main/protos/sigstore_bundle.proto
|
||||||
[9]: https://jsonlines.org/
|
[9]: https://jsonlines.org/
|
||||||
[10]: https://github.com/actions/toolkit/tree/main/packages/glob#patterns
|
[10]: https://github.com/actions/toolkit/tree/main/packages/glob#patterns
|
||||||
[11]:
|
[11]: https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds
|
||||||
https://docs.github.com/en/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds
|
|
||||||
|
|||||||
+9
-8
@@ -1,12 +1,12 @@
|
|||||||
# Release Instructions
|
# Release Instructions
|
||||||
|
|
||||||
Follow the steps below to tag a new release for the `actions/attest-sbom`
|
Follow the steps below to tag a new release for the
|
||||||
action.
|
`actions/attest-sbom` action.
|
||||||
|
|
||||||
If changes were made to the internal `actions/attest-sbom/predicate` action (any
|
If changes were made to the internal `actions/attest-sbom/predicate`
|
||||||
updates to [`./predicate/action.yaml`](./predicate/action.yml) or any of the
|
action (any updates to [`./predicate/action.yaml`](./predicate/action.yml) or
|
||||||
code in the [`./src`](./src) directory), start with step #1; otherwise, skip
|
any of the code in the [`./src`](./src) directory), start with step #1;
|
||||||
directly to step #5.
|
otherwise, skip directly to step #5.
|
||||||
|
|
||||||
1. Merge the latest changes to the `main` branch.
|
1. Merge the latest changes to the `main` branch.
|
||||||
1. Create and push a new predicate tag of the form `[email protected]` following
|
1. Create and push a new predicate tag of the form `[email protected]` following
|
||||||
@@ -17,8 +17,9 @@ directly to step #5.
|
|||||||
git push --tags
|
git push --tags
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Update the reference to the `actions/attest-sbom/predicate` action in
|
1. Update the reference to the `actions/attest-sbom/predicate`
|
||||||
[`action.yml`](./action.yml) to point to the SHA of the newly created tag.
|
action in [`action.yml`](./action.yml) to point to the SHA of the newly
|
||||||
|
created tag.
|
||||||
1. Push the `action.yml` change and open a PR. Once it has been reviewed, merge
|
1. Push the `action.yml` change and open a PR. Once it has been reviewed, merge
|
||||||
the PR and proceed with the release instructions.
|
the PR and proceed with the release instructions.
|
||||||
1. Create a new release for the top-level action using a tag of the form
|
1. Create a new release for the top-level action using a tag of the form
|
||||||
|
|||||||
+39
-36
@@ -1,38 +1,41 @@
|
|||||||
{
|
{
|
||||||
"spdxVersion": "SPDX-2.3",
|
"spdxVersion": "SPDX-2.3",
|
||||||
"dataLicense": "CC0-1.0",
|
"dataLicense": "CC0-1.0",
|
||||||
"SPDXID": "SPDXRef-DOCUMENT",
|
"SPDXID": "SPDXRef-DOCUMENT",
|
||||||
"name": "./",
|
"name": "./",
|
||||||
"documentNamespace": "https://anchore.com/syft/dir/80b363b6-87f4-4162-853f-60d402537d20",
|
"documentNamespace": "https://anchore.com/syft/dir/80b363b6-87f4-4162-853f-60d402537d20",
|
||||||
"creationInfo": {
|
"creationInfo": {
|
||||||
"licenseListVersion": "3.22",
|
"licenseListVersion": "3.22",
|
||||||
"creators": ["Organization: Anchore, Inc", "Tool: syft-0.103.1"],
|
"creators": [
|
||||||
"created": "2024-01-31T18:22:50Z"
|
"Organization: Anchore, Inc",
|
||||||
},
|
"Tool: syft-0.103.1"
|
||||||
"packages": [
|
],
|
||||||
{
|
"created": "2024-01-31T18:22:50Z"
|
||||||
"name": "@ampproject/remapping",
|
},
|
||||||
"SPDXID": "SPDXRef-Package-npm--ampproject-remapping-5266573ba4f24a42",
|
"packages": [
|
||||||
"versionInfo": "2.2.1",
|
{
|
||||||
"supplier": "NOASSERTION",
|
"name": "@ampproject/remapping",
|
||||||
"downloadLocation": "NOASSERTION",
|
"SPDXID": "SPDXRef-Package-npm--ampproject-remapping-5266573ba4f24a42",
|
||||||
"filesAnalyzed": false,
|
"versionInfo": "2.2.1",
|
||||||
"sourceInfo": "acquired package info from installed node module manifest file: /yarn.lock",
|
"supplier": "NOASSERTION",
|
||||||
"licenseConcluded": "NOASSERTION",
|
"downloadLocation": "NOASSERTION",
|
||||||
"licenseDeclared": "Apache-2.0",
|
"filesAnalyzed": false,
|
||||||
"copyrightText": "NOASSERTION",
|
"sourceInfo": "acquired package info from installed node module manifest file: /yarn.lock",
|
||||||
"externalRefs": [
|
"licenseConcluded": "NOASSERTION",
|
||||||
{
|
"licenseDeclared": "Apache-2.0",
|
||||||
"referenceCategory": "SECURITY",
|
"copyrightText": "NOASSERTION",
|
||||||
"referenceType": "cpe23Type",
|
"externalRefs": [
|
||||||
"referenceLocator": "cpe:2.3:a:\\@ampproject\\/remapping:\\@ampproject\\/remapping:2.2.1:*:*:*:*:*:*:*"
|
{
|
||||||
},
|
"referenceCategory": "SECURITY",
|
||||||
{
|
"referenceType": "cpe23Type",
|
||||||
"referenceCategory": "PACKAGE-MANAGER",
|
"referenceLocator": "cpe:2.3:a:\\@ampproject\\/remapping:\\@ampproject\\/remapping:2.2.1:*:*:*:*:*:*:*"
|
||||||
"referenceType": "purl",
|
},
|
||||||
"referenceLocator": "pkg:npm/%40ampproject/[email protected]"
|
{
|
||||||
}
|
"referenceCategory": "PACKAGE-MANAGER",
|
||||||
]
|
"referenceType": "purl",
|
||||||
}
|
"referenceLocator": "pkg:npm/%40ampproject/[email protected]"
|
||||||
]
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
+6
-14
@@ -9,8 +9,7 @@ inputs:
|
|||||||
subject-path:
|
subject-path:
|
||||||
description: >
|
description: >
|
||||||
Path to the artifact serving as the subject of the attestation. Must
|
Path to the artifact serving as the subject of the attestation. Must
|
||||||
specify exactly one of "subject-path" or "subject-digest". May contain a
|
specify exactly one of "subject-path" or "subject-digest".
|
||||||
glob pattern or list of paths (total subject count cannot exceed 2500).
|
|
||||||
required: false
|
required: false
|
||||||
subject-digest:
|
subject-digest:
|
||||||
description: >
|
description: >
|
||||||
@@ -25,9 +24,9 @@ inputs:
|
|||||||
path.
|
path.
|
||||||
sbom-path:
|
sbom-path:
|
||||||
description: >
|
description: >
|
||||||
Path to the JSON-formatted SBOM file to attest. File size cannot exceed
|
Path to the JSON-formatted SBOM file to attest. When specified, the
|
||||||
16MB.
|
"scan-path" and "sbom-format" inputs are ignored.
|
||||||
required: true
|
required: false
|
||||||
push-to-registry:
|
push-to-registry:
|
||||||
description: >
|
description: >
|
||||||
Whether to push the provenance statement to the image registry. Requires
|
Whether to push the provenance statement to the image registry. Requires
|
||||||
@@ -35,12 +34,6 @@ inputs:
|
|||||||
and that the "subject-digest" parameter be specified. Defaults to false.
|
and that the "subject-digest" parameter be specified. Defaults to false.
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
show-summary:
|
|
||||||
description: >
|
|
||||||
Whether to attach a list of generated attestations to the workflow run
|
|
||||||
summary page. Defaults to true.
|
|
||||||
default: true
|
|
||||||
required: false
|
|
||||||
github-token:
|
github-token:
|
||||||
description: >
|
description: >
|
||||||
The GitHub token used to make authenticated API requests.
|
The GitHub token used to make authenticated API requests.
|
||||||
@@ -58,8 +51,8 @@ runs:
|
|||||||
- uses: actions/attest-sbom/predicate@534423496eab34674190bc45fdacbb8b1198e07f # [email protected]
|
- uses: actions/attest-sbom/predicate@534423496eab34674190bc45fdacbb8b1198e07f # [email protected]
|
||||||
id: generate-sbom-predicate
|
id: generate-sbom-predicate
|
||||||
with:
|
with:
|
||||||
sbom-path: ${{ inputs.sbom-path }}
|
sbom-path: ${{ inputs.sbom-path || steps.sbom-output.outputs.path }}
|
||||||
- uses: actions/attest@67422f5511b7ff725f4dbd6fb9bd2cd925c65a8d # v1.4.1
|
- uses: actions/attest@bdehamer/skip-attestation-store
|
||||||
id: attest
|
id: attest
|
||||||
with:
|
with:
|
||||||
subject-path: ${{ inputs.subject-path }}
|
subject-path: ${{ inputs.subject-path }}
|
||||||
@@ -70,5 +63,4 @@ runs:
|
|||||||
predicate-path:
|
predicate-path:
|
||||||
${{ steps.generate-sbom-predicate.outputs.predicate-path }}
|
${{ steps.generate-sbom-predicate.outputs.predicate-path }}
|
||||||
push-to-registry: ${{ inputs.push-to-registry }}
|
push-to-registry: ${{ inputs.push-to-registry }}
|
||||||
show-summary: ${{ inputs.show-summary }}
|
|
||||||
github-token: ${{ inputs.github-token }}
|
github-token: ${{ inputs.github-token }}
|
||||||
|
|||||||
+4
-3
@@ -24945,7 +24945,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.run = run;
|
exports.run = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const sbom_1 = __nccwpck_require__(6210);
|
const sbom_1 = __nccwpck_require__(6210);
|
||||||
/**
|
/**
|
||||||
@@ -24969,6 +24969,7 @@ async function run() {
|
|||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
exports.run = run;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -25005,8 +25006,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.generateSBOMPredicate = exports.storePredicate = void 0;
|
exports.generateSBOMPredicate = exports.storePredicate = exports.parseSBOMFromPath = void 0;
|
||||||
exports.parseSBOMFromPath = parseSBOMFromPath;
|
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
async function parseSBOMFromPath(filePath) {
|
async function parseSBOMFromPath(filePath) {
|
||||||
@@ -25021,6 +25021,7 @@ async function parseSBOMFromPath(filePath) {
|
|||||||
}
|
}
|
||||||
throw new Error('Unsupported SBOM format');
|
throw new Error('Unsupported SBOM format');
|
||||||
}
|
}
|
||||||
|
exports.parseSBOMFromPath = parseSBOMFromPath;
|
||||||
function checkIsSPDX(sbomObject) {
|
function checkIsSPDX(sbomObject) {
|
||||||
if (sbomObject?.spdxVersion && sbomObject?.SPDXID) {
|
if (sbomObject?.spdxVersion && sbomObject?.SPDXID) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Generated
+397
-299
File diff suppressed because it is too large
Load Diff
+10
-10
@@ -73,22 +73,22 @@
|
|||||||
"@actions/core": "^1.10.1"
|
"@actions/core": "^1.10.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/attest": "^1.4.0",
|
"@actions/attest": "^1.2.1",
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^22.4.1",
|
"@types/node": "^20.12.12",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
"@typescript-eslint/eslint-plugin": "^7.10.0",
|
||||||
"@typescript-eslint/parser": "^7.18.0",
|
"@typescript-eslint/parser": "^7.10.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-plugin-github": "^5.0.1",
|
"eslint-plugin-github": "^4.10.2",
|
||||||
"eslint-plugin-jest": "^28.8.0",
|
"eslint-plugin-jest": "^28.5.0",
|
||||||
"eslint-plugin-jsonc": "^2.16.0",
|
"eslint-plugin-jsonc": "^2.16.0",
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"markdownlint-cli": "^0.41.0",
|
"markdownlint-cli": "^0.41.0",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.2.5",
|
||||||
"prettier-eslint": "^16.3.0",
|
"prettier-eslint": "^16.3.0",
|
||||||
"ts-jest": "^29.2.4",
|
"ts-jest": "^29.1.3",
|
||||||
"typescript": "^5.5.4"
|
"typescript": "^5.4.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user