-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
2,009 additions
and
1,556 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Sync Trivy Checks | ||
|
||
on: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: ${{ github.repository_owner }}/trivy-checks | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
sync-trivy-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Pull Trivy Checks | ||
run: | | ||
oras pull ghcr.io/aquasecurity/trivy-checks:0 | ||
- name: Login to GitHub Packages Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push Trivy Checks | ||
run: | | ||
oras push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \ | ||
--config /dev/null:application/vnd.cncf.openpolicyagent.config.v1+json \ | ||
bundle.tar.gz:application/vnd.cncf.openpolicyagent.layer.v1.tar+gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Sync Trivy DB | ||
|
||
on: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: ${{ github.repository_owner }}/trivy-db | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
sync-trivy-db: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Pull Trivy DB | ||
run: | | ||
oras pull ghcr.io/aquasecurity/trivy-db:2 | ||
- name: Login to GitHub Packages Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push Trivy DB | ||
run: | | ||
oras push --artifact-type application/vnd.aquasec.trivy.config.v1+json \ | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \ | ||
db.tar.gz:application/vnd.aquasec.trivy.db.layer.v1.tar+gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Sync Trivy Java DB | ||
|
||
on: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: ${{ github.repository_owner }}/trivy-java-db | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
sync-trivy-db: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Pull Trivy DB | ||
run: oras pull ghcr.io/aquasecurity/trivy-java-db:1 | ||
|
||
- name: Login to GitHub Packages Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push Trivy DB | ||
run: | | ||
oras push --artifact-type application/vnd.aquasec.trivy.config.v1+json \ | ||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \ | ||
javadb.tar.gz:application/vnd.aquasec.trivy.javadb.layer.v1.tar+gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
TRIVY_VERSION: 0.50.1 | ||
BATS_LIB_PATH: '/usr/lib/' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Bats and bats libs | ||
uses: bats-core/bats-action@2.0.0 | ||
|
||
- name: Install Trivy | ||
run: | | ||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v${{ env.TRIVY_VERSION }} | ||
trivy --version | ||
- name: Test | ||
run: | | ||
chmod +x entrypoint.sh | ||
bats -r -T . |
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# test data for trivy config with terraform variables | ||
|
||
variable "bucket_versioning_enabled" { | ||
type = string | ||
default = "Disabled" | ||
} | ||
|
||
resource "aws_s3_bucket" "bucket" { | ||
bucket = "trivy-action-bucket" | ||
} | ||
|
||
resource "aws_s3_bucket_versioning" "bucket_versioning" { | ||
bucket = aws_s3_bucket.bucket.id | ||
|
||
versioning_configuration { | ||
status = var.bucket_versioning_enabled | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.