Skip to content

create demo for witness enterprise LLM integration #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
pull_request: ${{ github.event_name == 'pull_request' }}
step: fmt
attestations: "git github environment"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
command: go fmt ./...

vet:
Expand All @@ -28,7 +28,7 @@ jobs:
pull_request: ${{ github.event_name == 'pull_request' }}
step: vet
attestations: "git github environment"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
command: go vet ./...

# --ignore DL3002
Expand All @@ -39,7 +39,7 @@ jobs:
step: lint
pre-command-attestations: "git github environment"
attestations: "git github environment"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
pre-command: |
curl -sSfL https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 -o /usr/local/bin/hadolint && \
chmod +x /usr/local/bin/hadolint
Expand All @@ -54,7 +54,7 @@ jobs:
pull_request: ${{ github.event_name == 'pull_request' }}
step: unit-test
attestations: "git github environment"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
command: go test ./... -coverprofile cover.out
artifact-upload-name: cover.out
artifact-upload-path: cover.out
Expand All @@ -67,7 +67,7 @@ jobs:
step: sast
pre-command-attestations: "git github environment"
attestations: "git github environment"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
pre-command: python3 -m pip install semgrep==1.45.0
command: semgrep scan --config auto ./ --sarif -o semgrep.sarif
artifact-upload-name: semgrep.sarif
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
version: 0.6.0
step: build-image
attestations: "git github environment slsa"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
command: |
/bin/sh -c "docker buildx build --platform linux/amd64,linux/arm64 -t ${{ steps.meta.outputs.tags }} --push ."
outputs:
Expand All @@ -134,7 +134,7 @@ jobs:
pull_request: ${{ github.event_name == 'pull_request' }}
step: save-image
attestations: "git github environment slsa oci"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
command: |
docker pull ${{ needs.build-image.outputs.tags }} && docker save ${{ needs.build-image.outputs.tags }} -o image.tar
artifact-upload-name: image.tar
Expand All @@ -148,7 +148,7 @@ jobs:
step: generate-sbom
pre-command-attestations: "git github environment"
attestations: "git github environment sbom"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
artifact-download: image.tar
pre-command: |
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
Expand All @@ -165,7 +165,7 @@ jobs:
step: secret-scan
pre-command-attestations: "git github environment"
attestations: "git github environment"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
artifact-download: image.tar
pre-command: |
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b /usr/local/bin
Expand All @@ -184,10 +184,10 @@ jobs:
step: verify
pre-command-attestations: "git github environment"
attestations: "git github environment"
archivista-server: "https://judge-api.aws-sandbox-staging.testifysec.dev"
archivista-server: "https://archivista.testifysec.io"
artifact-download: image.tar
pre-command: |
curl -sSfL https://github.com/in-toto/witness/releases/download/v0.6.0/witness_0.6.0_linux_amd64.tar.gz -o witness.tar.gz && \
tar -xzvf witness.tar.gz -C /usr/local/bin/ && rm ./witness.tar.gz
command: |
witness verify -p policy-signed.json -k swfpublic.pem -f /tmp/image.tar --enable-archivista --archivista-server https://judge-api.aws-sandbox-staging.testifysec.dev -l debug
witness verify -p policy-signed.json -k swfpublic.pem -f /tmp/image.tar --enable-archivista --archivista-server https://archivista.testifysec.io -l debug
2 changes: 1 addition & 1 deletion policy-signed.json

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,15 @@
},
{
"type": "https://witness.dev/attestations/product/v0.1"
},
{
"type": "https://witness.dev/attestations/sbom/v0.1",
"aipolicies": [
{
"name": "Check SBOM for GPL-2.0",
"prompt": "Check SBOM for GPL-2.0 and fail if found"
}
]
}
],
"functionaries": [
Expand Down
28 changes: 28 additions & 0 deletions private_key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC1D0+7NtepGGe3
0Irj/jjSOc4p4WSyL6MUTV0FFl0RQ55CWhPqAK7S55z5wajiSWSghY7pU5vqrh43
pw68oomXUmFcm///oXurgfRQWKXWcjm9fWInCxWJjZwe/dAKpPmbVmJcVzqPUV0D
bG1kNzzkm+nj6lpm648StZbjkPE9qahdwYY8ChRF96lQWxLjQHj+du7XN930StZj
d2XCu9OcSkrXBkA4cnqYdp6NlshqhaalDiGoNVws2YKgyOurayhoeKms8ZCD3UKt
BGgm8hxLv7z2qlRUTuE4IVxxwMex2lX+5XcIk78IhWUCQXu8XR2/8pQIx4c6jIQj
NbnUKL6LAgMBAAECggEAVPeZgA7Nh/IHAlDgTPwJaEZuRGMcoS4PxsBDbda/2BE2
XIbvH3owkJLWrLI/8ellSptCpKZy3d/WGGHSXZ2dGiEzxYUDzs/WPH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LSxVX+iigCuiogPUP3Q7U5h5me3ZJuROMJQjKZnN
TxDqHZRaSlsPA0VsfHqd4kY=
-----END PRIVATE KEY-----
9 changes: 9 additions & 0 deletions public_key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtQ9PuzbXqRhnt9CK4/44
0jnOKeFksi+jFE1dBRZdEUOeQloT6gCu0uec+cGo4klkoIWO6VOb6q4eN6cOvKKJ
l1JhXJv//6F7q4H0UFil1nI5vX1iJwsViY2cHv3QCqT5m1ZiXFc6j1FdA2xtZDc8
5Jvp4+paZuuPErWW45DxPamoXcGGPAoURfepUFsS40B4/nbu1zfd9ErWY3dlwrvT
nEpK1wZAOHJ6mHaejZbIaoWmpQ4hqDVcLNmCoMjrq2soaHiprPGQg91CrQRoJvIc
S7+89qpUVE7hOCFcccDHsdpV/uV3CJO/CIVlAkF7vF0dv/KUCMeHOoyEIzW51Ci+
iwIDAQAB
-----END PUBLIC KEY-----