-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 'feat/composer-intalled-json'
- Loading branch information
Showing
358 changed files
with
16,537 additions
and
4,560 deletions.
There are no files selected for viewing
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,31 @@ | ||
title: "<company name>" | ||
labels: ["adopters"] | ||
body: | ||
- type: textarea | ||
id: info | ||
attributes: | ||
label: "[Optional] How do you use Trivy?" | ||
validations: | ||
required: false | ||
- type: checkboxes | ||
attributes: | ||
label: "[Optional] Which targets are you scanning with Trivy?" | ||
options: | ||
- label: "Container Image" | ||
- label: "Filesystem" | ||
- label: "Git Repository" | ||
- label: "Virtual Machine Image" | ||
- label: "Kubernetes" | ||
- label: "AWS" | ||
- label: "SBOM" | ||
validations: | ||
required: false | ||
- type: checkboxes | ||
attributes: | ||
label: "[Optional] What kind of issues are scanning with Trivy?" | ||
options: | ||
- label: "Software Bill of Materials (SBOM)" | ||
- label: "Known vulnerabilities (CVEs)" | ||
- label: "IaC issues and misconfigurations" | ||
- label: "Sensitive information and secrets" | ||
- label: "Software licenses" |
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
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
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
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
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,46 @@ | ||
name: Auto-close issues | ||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
close_issue: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Close issue if user does not have write or admin permissions | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
// Get the issue creator's username | ||
const issueCreator = context.payload.issue.user.login; | ||
// Check the user's permissions for the repository | ||
const repoPermissions = await github.rest.repos.getCollaboratorPermissionLevel({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
username: issueCreator | ||
}); | ||
const permission = repoPermissions.data.permission; | ||
// If the user does not have write or admin permissions, leave a comment and close the issue | ||
if (permission !== 'write' && permission !== 'admin') { | ||
const commentBody = "Please see https://aquasecurity.github.io/trivy/latest/community/contribute/issue/"; | ||
await github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.payload.issue.number, | ||
body: commentBody | ||
}); | ||
await github.rest.issues.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.payload.issue.number, | ||
state: 'closed', | ||
state_reason: 'not_planned' | ||
}); | ||
console.log(`Issue #${context.payload.issue.number} closed because ${issueCreator} does not have sufficient permissions.`); | ||
} |
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: Auto-update labels | ||
on: | ||
push: | ||
paths: | ||
- 'misc/triage/labels.yaml' | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
name: Auto-update labels | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- name: Install aqua tools | ||
uses: aquaproj/[email protected] | ||
with: | ||
aqua_version: v1.25.0 | ||
|
||
- name: update labels | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: mage label |
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Restore Trivy binaries from cache | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
path: dist/ | ||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}} | ||
|
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,31 @@ | ||
name: Check Go versions of dependencies | ||
on: | ||
pull_request: | ||
paths: | ||
- 'go.mod' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-go-versions: | ||
name: Check Go versions of dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: stable | ||
|
||
# This workflow is a workaround before the "old stable" version becomes Go 1.21. | ||
# To avoid updating dependencies that require Go 1.21, we use this workflow | ||
# Example of wrong update: | ||
# https://github.com/aquasecurity/trivy/discussions/5323#discussioncomment-7186321 | ||
- name: Check that dependencies doesn't require Go 1.21 | ||
run: | | ||
go mod tidy | ||
if grep -q "go 1.21" go.mod; then | ||
echo "One of new dependencies requires Go '1.21'. Use 'go get [email protected]' to fix this." | ||
exit 1 | ||
fi |
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
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
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
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 |
---|---|---|
|
@@ -19,12 +19,12 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Restore Trivy binaries from cache | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
path: dist/ | ||
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}} | ||
|
@@ -35,7 +35,7 @@ jobs: | |
sudo apt-get -y install rpm reprepro createrepo-c distro-info | ||
- name: Checkout trivy-repo | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.0 | ||
with: | ||
repository: ${{ github.repository_owner }}/trivy-repo | ||
path: trivy-repo | ||
|
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 |
---|---|---|
|
@@ -27,7 +27,7 @@ jobs: | |
contents: read # Not required for public repositories, but for clarity | ||
steps: | ||
- name: Maximize build space | ||
uses: easimon/maximize-build-space@v7 | ||
uses: easimon/maximize-build-space@v8 | ||
with: | ||
root-reserve-mb: 35840 # The Go cache (`~/.cache/go-build` and `~/go/pkg`) requires a lot of storage space. | ||
remove-android: 'true' | ||
|
@@ -36,40 +36,40 @@ jobs: | |
remove-haskell: 'true' | ||
|
||
- name: Cosign install | ||
uses: sigstore/cosign-installer@a5d81fb6bdbcbb3d239e864d6552820420254494 | ||
uses: sigstore/cosign-installer@4a861528be5e691840a69536975ada1d4c30349d | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Show available Docker Buildx platforms | ||
run: echo ${{ steps.buildx.outputs.platforms }} | ||
|
||
- name: Login to docker.io registry | ||
uses: docker/login-action@v2 | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Login to ghcr.io registry | ||
uses: docker/login-action@v2 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ env.GH_USER }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to ECR | ||
uses: docker/login-action@v2 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: public.ecr.aws | ||
username: ${{ secrets.ECR_ACCESS_KEY_ID }} | ||
password: ${{ secrets.ECR_SECRET_ACCESS_KEY }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
@@ -93,7 +93,7 @@ jobs: | |
- name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
version: v1.16.2 | ||
version: v1.20.0 | ||
args: release -f=${{ inputs.goreleaser_config}} ${{ inputs.goreleaser_options}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }} | ||
|
@@ -121,7 +121,7 @@ jobs: | |
public.ecr.aws/aquasecurity/trivy:canary | ||
- name: Cache Trivy binaries | ||
uses: actions/[email protected].1 | ||
uses: actions/[email protected].2 | ||
with: | ||
path: dist/ | ||
# use 'github.sha' to create a unique cache folder for each run. | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3.5.3 | ||
uses: actions/checkout@v4.1.0 | ||
|
||
- name: Run Trivy vulnerability scanner and create GitHub issues | ||
uses: knqyf263/[email protected] | ||
|
Oops, something went wrong.