Commit Graph

108 Commits

Author SHA1 Message Date
Ramon Petgrave
f9a4b35ff6 cli help about default options
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-25 15:32:17 +00:00
Ramon Petgrave
92ce34e767 fix capitalization
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-25 15:28:18 +00:00
Ramon Petgrave
23d8e33dfd singular attestation path
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-22 00:46:28 +00:00
Ramon Petgrave
e0919a83e0 hash-algo description
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-22 00:41:08 +00:00
Ramon Petgrave
b9c6de5635 flag descriptions, optional --verified-levels
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-22 00:34:53 +00:00
Ramon Petgrave
519a928c72 clarify comments
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-22 00:19:46 +00:00
Ramon Petgrave
0172a12823 lint
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 22:17:11 +00:00
Ramon Petgrave
73c9884da6 lint: no pointer for crypto.publickkey
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 22:10:46 +00:00
Ramon Petgrave
942d8bbe3d remove accidental binary
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 20:50:28 +00:00
Ramon Petgrave
ff1cf43ce9 undo regression tag change
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 20:48:19 +00:00
Ramon Petgrave
cba639f855 specific errors and test cases
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 20:43:26 +00:00
Ramon Petgrave
e47312f593 literl hash algo
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 19:56:21 +00:00
Ramon Petgrave
00fed87dbc typo
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 19:53:45 +00:00
Ramon Petgrave
8befbc6e94 use plain bool
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 18:12:51 +00:00
Ramon Petgrave
fec61b1f27 use pointers
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 18:03:48 +00:00
Ramon Petgrave
5636d0a832 rename to resource URI
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 16:58:13 +00:00
Ramon Petgrave
f5362e5a4a rename to PublicKeyHashAlgo
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 16:49:43 +00:00
Ramon Petgrave
f0fedec1dd verify vsa passed message
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-20 15:59:09 +00:00
Ramon Petgrave
944c9a6f4c singular print-attestation
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-19 00:32:31 +00:00
Ramon Petgrave
610ef6f1af verify reamining fields, print attestations
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-19 00:30:15 +00:00
Ramon Petgrave
13a74b5b4a embed the google vsa key, match against all signatures, match the subject digests
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-18 22:18:25 +00:00
Ramon Petgrave
2f76f12ff3 different test example
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-18 18:34:37 +00:00
Ramon Petgrave
a3a573a800 cleanup
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-17 16:06:50 +00:00
Ramon Petgrave
b90ede0bde rename to TrustedProducerID, allow muyltiple --subject-digest flags
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-14 18:15:25 +00:00
Ramon Petgrave
a25abe2323 testdata, sample invocation in README.md
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-13 22:28:58 +00:00
Ramon Petgrave
b5eb1473b8 skeletion verify-vsa command
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-13 22:28:08 +00:00
Ramon Petgrave
7980fdebf6 Changed success message to a more general "PASSED: SLSA verification passed"
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-06-13 22:22:56 +00:00
Mend Renovate
9c4e2196d8 chore(deps): update gcr.io/distroless/base:nonroot docker digest to 53745e9 (#763)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| gcr.io/distroless/base | final | digest | `1a8ece8` -> `53745e9` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/slsa-framework/slsa-verifier).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Signed-off-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com>
2024-05-06 16:01:16 +00:00
Mend Renovate
f787eeebf7 chore(deps): update golang:1.21 docker digest to d83472f (#764)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| golang | stage | digest | `81811f8` -> `d83472f` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/slsa-framework/slsa-verifier).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Signed-off-by: Mend Renovate <bot@renovateapp.com>
2024-05-06 11:48:47 -04:00
Ramon Petgrave
637b07fdab chore: slsa-framework/slsa-github-generator@v2.0.0: add testdata (#758)
https://github.com/slsa-framework/slsa-github-generator/issues/3576

Next step in 

https://github.com/slsa-framework/slsa-github-generator/blob/main/RELEASE.md#update-verifier

Creating new test data for slsa-github-generator@v2.0.0

# Instructions:

## diff to download-artifacts.sh

```
diff --git a/download-artifacts.sh b/download-artifacts.sh
old mode 100644
new mode 100755
index e5e218e8..49257ea6
--- a/download-artifacts.sh
+++ b/download-artifacts.sh
@@ -88,6 +88,10 @@ unzip_files() {
         rm -rf "${tmp_dir}"
         ;;
 
+    ./*.zip)
+        unzip -o "${zip_path}" -d "${output_path}"
+        ;;
+
     *)
         echo "unexpected file path: ${zip_path}"
         exit 1
@@ -167,7 +171,7 @@ rename_java_files "test-java-project-" "maven"
 rename_java_files "workflow_dispatch-" "gradle"
 
 # Files downloaded. Now copy them
-repo_path="../.."
+repo_path="/path/to/slsa-verifier"
 
 # Go builder files.
 copy_files "gha_go-binary-linux-amd64-" "${repo_path}/cli/slsa-verifier/testdata/gha_go/${version}"
```

## download the artifacts

```
../slsa-verifier/download-artifacts.sh 8791212155 v2.0.0
../slsa-verifier/download-artifacts.sh 8791219359 v2.0.0
../slsa-verifier/download-artifacts.sh 8791219514 v2.0.0
../slsa-verifier/download-artifacts.sh 8791219607 v2.0.0
```

## docker github auth

```
gh auth login --scopes=read:packages
echo `gh auth token` | docker login ghcr.io -u ramonpetgrave64 --password-stdin
cosign save \
    --dir ./cli/slsa-verifier/testdata/gha_generic_container/v2.0.0/container_workflow_dispatch \
    ghcr.io/slsa-framework/example-package.verifier-e2e.all.tag.main.default.slsa3@sha256:55aee984fd6b1d0e0a19a55265d10d40063a2212bdbabd75b202b1728236548d
```

---------

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
2024-04-23 12:26:13 -04:00
Mend Renovate
ee32cbff7e chore(deps): update golang:1.21 docker digest to 81811f8 (#693)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| golang | stage | digest | `ec457a2` -> `81811f8` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/slsa-framework/slsa-verifier).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzcuMzAxLjQiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Signed-off-by: Mend Renovate <bot@renovateapp.com>
Co-authored-by: Ramon Petgrave <32398091+ramonpetgrave64@users.noreply.github.com>
2024-04-18 16:46:15 +00:00
Mend Renovate
363e8da4fa chore(deps): update gcr.io/distroless/base:nonroot docker digest to 1a8ece8 (#701)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| gcr.io/distroless/base | final | digest | `c623859` -> `1a8ece8` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/slsa-framework/slsa-verifier).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi42OC4xIiwidXBkYXRlZEluVmVyIjoiMzcuMjY5LjIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Signed-off-by: Mend Renovate <bot@renovateapp.com>
2024-04-01 08:13:46 -07:00
laurentsimon
dc7173b856 feat: Regression tests for builder v1.10.0 (#745)
We need the pre-submit to pass. Merging can happen after the builder
release

---------

Signed-off-by: laurentsimon <laurentsimon@google.com>
2024-03-21 08:48:59 -07:00
saisatishkarra
9b2467f836 feat: fixes #724: add input for --provenance-repository while image verification (#736)
@laurentsimon Added a new image verification cmd input
`--provenance-repository`
This replicates the feature of the `COSIGN_REPOSITORY` environment
variable when provenance is stored in a different repository/registry

Order of precedence:
- If input `--provenance-repository` is set, leverages the non-empty
input value
- If the env variable `COSIGN_REPOSITORY` is set, it is NOT consumed

README edit :
https://github.com/slsa-framework/slsa-verifier/pull/736/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R280

---------

Signed-off-by: saisatishkarra <saisatish.karra@konghq.com>
Co-authored-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
2024-01-22 18:10:11 +00:00
laurentsimon
417b7aacc6 feat: Rename verifySubjectDigest function (#712)
closes https://github.com/slsa-framework/slsa-verifier/issues/711

Signed-off-by: laurentsimon <laurentsimon@google.com>
2023-10-10 07:37:38 +09:00
laurentsimon
f6ae402f45 fix: npm publish verification (#705)
- adding support for IEEE P1363 formatted signatures
- fix the npm publish attestation bug. The verification always return
success, because it was not using PAE signature

---------

Signed-off-by: laurentsimon <laurentsimon@google.com>
Signed-off-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
Co-authored-by: Ian Lewis <ianlewis@google.com>
Co-authored-by: Trishank Karthik Kuppusamy <trishank.kuppusamy@datadoghq.com>
2023-10-02 10:12:51 -07:00
laurentsimon
80c7d86183 feat: v1.9.0 regression tests (#696)
Add regression tests for BYOB releae.

---------

Signed-off-by: laurentsimon <laurentsimon@google.com>
2023-08-24 09:20:57 -07:00
Mend Renovate
9d7646a7af chore(deps): update golang docker tag to v1.21 (#687)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| golang | stage | minor | `1.19` -> `1.21` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the
Dependency Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/slsa-framework/slsa-verifier).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Signed-off-by: Mend Renovate <bot@renovateapp.com>
2023-08-14 15:34:48 -07:00
Ian Lewis
612f4e525f test: Add test data for v1.8.0 (#681)
Signed-off-by: Ian Lewis <ianlewis@google.com>
2023-08-08 13:58:30 +09:00
Mend Renovate
7aa6533540 chore(deps): update golang:1.19 docker digest to 83f9f84 (#583)
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-06-12 05:06:28 +00:00
Mend Renovate
b69ed475aa chore(deps): update gcr.io/distroless/base:nonroot docker digest to c623859 (#567)
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2023-06-12 01:00:06 +00:00
asraa
3a772f79ec test: add tests for v1.7.0 builders (#638)
* test: add tests for v1.7.0 builders

Signed-off-by: Asra Ali <asraa@google.com>

---------

Signed-off-by: Asra Ali <asraa@google.com>
2023-06-08 21:14:28 +00:00
asraa
aac022747e feat: remove experimental on Sigstore bundle and v1.0 SLSA provenance format (#634)
* feat: remove experimental on Sigstore bundle and v1.0 SLSA provenance format

Signed-off-by: Asra Ali <asraa@google.com>

* docs: update verifier README.md for docker-based builder

Signed-off-by: Asra Ali <asraa@google.com>

---------

Signed-off-by: Asra Ali <asraa@google.com>
2023-06-06 22:07:20 +00:00
Ian Lewis
9bfbc91c5b refactor: Provenance tests (#628)
Refactors GHA provenance tests to use `testProvenance` which makes it clearer what is actually being tested. This will also make it easier to support `buildType` as a way to have different verification logic as the tests no longer rely on testdata with the `"https://github.com/Attestations/GitHubActionsWorkflow@v1"` build type, which isn't used by any supported builders.

A couple of updates to utilities:
- `VerifyTag` will now validate the ref returned by the `Provenance` instance.
- `VerifyBranch` will now validate the ref returned by the `Provenance` instance.
- `VerifyDigest` now supports the 160 bit `"sha1"` algo (FWIW) and will now search all subject entries even if one subject entry's algorithm does not match the expected algorithm.

---------

Signed-off-by: Ian Lewis <ianlewis@google.com>
2023-06-02 13:34:56 +09:00
asraa
70d23d4f26 test: re-generate container-based tests (#627)
Signed-off-by: Asra Ali <asraa@google.com>
2023-05-30 14:38:47 -05:00
Ian Lewis
de79463752 test: Add test data for v1.6.0 (#612)
---------

Signed-off-by: Ian Lewis <ianlewis@google.com>
2023-05-25 23:40:28 +00:00
laurentsimon
ba32c706ac feat: Support for v1.0 verification in BYOB (#609)
* update

Signed-off-by: laurentsimon <laurentsimon@google.com>

* update

Signed-off-by: laurentsimon <laurentsimon@google.com>

* update

Signed-off-by: laurentsimon <laurentsimon@google.com>

* update

Signed-off-by: laurentsimon <laurentsimon@google.com>

* update

Signed-off-by: laurentsimon <laurentsimon@google.com>

* update

Signed-off-by: laurentsimon <laurentsimon@google.com>

---------

Signed-off-by: laurentsimon <laurentsimon@google.com>
2023-05-23 07:31:13 -07:00
laurentsimon
18ee30fca6 docs: Make npm package version and name non-optional (#591)
update

Signed-off-by: laurentsimon <laurentsimon@google.com>
2023-05-12 02:16:46 +00:00
asraa
467e0820b6 chore: update slsa provenance to v1 (#579)
* chore: update slsa provenance to v1

Signed-off-by: Asra Ali <asraa@google.com>

* fix import path

Signed-off-by: Asra Ali <asraa@google.com>

* update dsse testcases

Signed-off-by: Asra Ali <asraa@google.com>

* fix cosign image verification in update

Signed-off-by: Asra Ali <asraa@google.com>

---------

Signed-off-by: Asra Ali <asraa@google.com>
2023-05-08 15:18:16 +00:00
laurentsimon
d67e7c1da7 feat: npm: Make package name and version mandatory for verification (#576)
Signed-off-by: laurentsimon <laurentsimon@google.com>
Co-authored-by: Ian Lewis <ianlewis@google.com>
2023-05-01 01:48:41 +00:00