-
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.
* update tests * rename trivy images * rename workflow steps
- Loading branch information
Showing
26 changed files
with
1,990 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,24 @@ | ||
name: Sync Trivy Checks | ||
|
||
on: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: ${{ github.repository_owner }}/trivy-checks-act | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
sync-trivy-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Packages Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Copy Trivy Checks | ||
run: | | ||
oras cp ghcr.io/aquasecurity/trivy-checks:0 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |
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,24 @@ | ||
name: Sync Trivy DB | ||
|
||
on: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: ${{ github.repository_owner }}/trivy-db-act | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
sync-trivy-db: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Packages Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Copy Trivy DB | ||
run: | | ||
oras cp ghcr.io/aquasecurity/trivy-db:2 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |
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,24 @@ | ||
name: Sync Trivy Java DB | ||
|
||
on: | ||
workflow_dispatch: | ||
env: | ||
IMAGE_NAME: ${{ github.repository_owner }}/trivy-java-db-act | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
sync-trivy-db: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Packages Container registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Copy Trivy Java DB | ||
run: | | ||
oras cp ghcr.io/aquasecurity/trivy-java-db:1 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest |
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.2 | ||
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.