Skip to content

Dynamic parameters #2

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

Draft
wants to merge 93 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
4f7ff4c
fix(terraform): expand `count` blocks can depend on submodule returns
Emyrk Mar 19, 2025
cd4d4b3
update unit test
Emyrk Mar 19, 2025
fc4b5f5
test(terraform): add counter example test
Emyrk Mar 19, 2025
9b757cc
fixup test
Emyrk Mar 19, 2025
c6831f9
test(terraform): add failing unit test with ambition to resolve
Emyrk Mar 19, 2025
6eb6063
chore: check for unknown and null to match upstream change
Emyrk Apr 9, 2025
f035137
chore(terraform): hook into evaluateStep behavior with custom hooks
Emyrk Jan 27, 2025
e25de25
fix(terraform): `evaluateStep` to correctly set `EvalContext` for mul…
Emyrk Apr 10, 2025
4a38d01
refactor(flag): improve flag system architecture and extensibility (#…
knqyf263 Apr 11, 2025
346a6b7
ci: improve PR title validation workflow (#8720)
knqyf263 Apr 11, 2025
9a5383e
fix(report): clean buffer after flushing (#8725)
afdesk Apr 12, 2025
195880b
refactor(misconf): switch to x/json (#8719)
nikpivkin Apr 12, 2025
b7dfd64
fix(misconf): check if metadata is not nil (#8647)
nikpivkin Apr 12, 2025
efd177b
fix(misconf): populate context correctly for module instances (#8656)
nikpivkin Apr 12, 2025
8e25ca0
refactor(misconf): remove module outputs from parser.EvaluateAll (#8587)
nikpivkin Apr 12, 2025
93efe07
feat(rust): add root and workspace relationships/package for `cargo` …
DmitriyLewen Apr 14, 2025
b7cbbdc
chore(deps): bump the common group across 1 directory with 23 updates…
dependabot[bot] Apr 14, 2025
4141013
chore(terraform): remove os.OpenPath call from terraform file functio…
Emyrk Apr 16, 2025
2849abb
ci: use `Skitionek/notify-microsoft-teams` instead of `aquasecurity` …
DmitriyLewen Apr 16, 2025
6c6beea
chore(terraform): option to pass in instanced logger (#8738)
Emyrk Apr 16, 2025
0d3efa5
fix(terraform): hcl object expressions to return references (#8271)
Emyrk Apr 16, 2025
8c9a92b
ci(helm): create a helm branch for patches from main (#8673)
afdesk Apr 16, 2025
3032def
ci(helm): bump Trivy version to 0.61.1 for Trivy Helm Chart 0.13.1 (#…
aqua-bot Apr 18, 2025
9fbfb04
chore(deps): bump the docker group across 1 directory with 3 updates …
dependabot[bot] Apr 22, 2025
7abf5f0
feat(misconf): convert AWS managed policy to document (#8757)
nikpivkin Apr 23, 2025
a95cab0
feat(image): save layers metadata into report (#8394)
DmitriyLewen Apr 23, 2025
427a18e
chore(deps): bump golangci-lint to v2.1.2 (#8766)
mmorel-35 Apr 23, 2025
312649c
refactor(ubuntu): update time handling for fixing time (#8780)
knqyf263 Apr 25, 2025
3ce7d59
fix(misconf): perform operations on attribute safely (#8774)
nikpivkin Apr 26, 2025
ee4f7dc
fix: testifylint last issues (#8768)
mmorel-35 Apr 28, 2025
e10929a
fix(misconf): filter null nodes when parsing json manifest (#8785)
nikpivkin Apr 28, 2025
dd62d4e
refactor(misconf): remove unused methods from iac types (#8782)
nikpivkin Apr 28, 2025
471dcc3
refactor(misconf): remove unused methods from providers (#8781)
nikpivkin Apr 29, 2025
7a58ccb
fix(k8s): remove using `last-applied-configuration` (#8791)
afdesk Apr 30, 2025
43350dd
fix: early-return, indent-error-flow and superfluous-else rules from …
mmorel-35 Apr 30, 2025
573f35c
chore(deps): Update trivy-checks (#8798)
simar7 Apr 30, 2025
6562082
fix: unused-parameter rule from revive (#8794)
mmorel-35 Apr 30, 2025
bf4cd4f
feat(nodejs): add root and workspace for `yarn` packages (#8535)
DmitriyLewen Apr 30, 2025
6e6af01
release: v0.62.0 [main] (#8669)
aqua-bot Apr 30, 2025
6e23ca9
ci(helm): bump Trivy version to 0.62.0 for Trivy Helm Chart 0.14.0 (#…
aqua-bot Apr 30, 2025
5706603
fix(misconf): check if for-each is known when expanding dyn block (#8…
nikpivkin May 2, 2025
1e0cfa6
Merge remote-tracking branch 'aqua/main' into stevenmasley/module_out…
Emyrk May 2, 2025
073fdef
chore: fix expand for_each using module output
Emyrk May 2, 2025
f0b293a
test rename
Emyrk May 2, 2025
86b3b93
update skip comment
Emyrk May 2, 2025
296eb3c
docs: change in java.md: fix the Trity -to-> Trivy typo (#8813)
tudorst May 2, 2025
3ab459e
fix: more revive rules (#8814)
mmorel-35 May 5, 2025
883c63b
fix: use-any from revive (#8810)
mmorel-35 May 5, 2025
e322f21
chore(deps): bump the common group across 1 directory with 10 updates…
dependabot[bot] May 5, 2025
fa1077b
fix(redhat): trim invalid suffix from content_sets in manifest parsin…
knqyf263 May 5, 2025
a19e0aa
fix: octalLiteral from go-critic (#8811)
mmorel-35 May 5, 2025
8995838
fix(java): exclude dev dependencies in gradle lockfile (#8803)
sneaky-potato May 5, 2025
2ab8ae9
chore(deps): bump golang.org/x/sync from 0.13.0 to 0.14.0 in the comm…
dependabot[bot] May 5, 2025
3bf4f44
docs(java): Update info about dev deps in gradle lock (#8830)
sneaky-potato May 6, 2025
dd6a6e5
feat(license): scan vendor directory for license for go.mod files (#8…
oneum20 May 6, 2025
36938e3
linting
Emyrk May 6, 2025
6791539
ci(helm): bump Trivy version to 0.62.1 for Trivy Helm Chart 0.14.1 (#…
aqua-bot May 7, 2025
3b1426a
chore: enable staticcheck (#8815)
mmorel-35 May 7, 2025
2a21fd8
chore: add an issue template for maintainers (#8838)
knqyf263 May 7, 2025
c9ba460
docs(vuln): remove OSV for Python from data sources (#8841)
DmitriyLewen May 7, 2025
a516775
feat(misconf): add misconfiguration location to junit template (#8793)
nikpivkin May 7, 2025
6ebde88
fix: filter all files when processing files installed from package ma…
DmitriyLewen May 8, 2025
9256804
fix(redhat): save contentSets for OS packages in fs/vm modes (#8820)
DmitriyLewen May 12, 2025
26437be
feat(go): support license scanning in both GOPATH and vendor (#8843)
knqyf263 May 12, 2025
e97af98
fix(vex): use `lo.IsNil` to check `VEX` from OCI artifact (#8858)
DmitriyLewen May 13, 2025
0b0e406
feat: add JSONC support for comments and trailing commas (#8862)
knqyf263 May 13, 2025
38f17c9
fix(server): add missed Relationship field for `rpc` (#8872)
DmitriyLewen May 15, 2025
239f65a
docs(misconf): Reorganize misconfiguration scan pages (#8206)
simar7 May 16, 2025
35e8889
fix(cli): don't use allow values for `--compliance` flag (#8881)
DmitriyLewen May 16, 2025
6aff7b0
refactor(db): change logic to detect wrong DB (#8864)
DmitriyLewen May 19, 2025
be8c7b7
fix: julia parser panicing (#8883)
SuperSandro2000 May 19, 2025
69a5fa1
fix(cli): disable `--skip-dir` and `--skip-files` flags for `sbom` co…
DmitriyLewen May 19, 2025
c321fdf
feat(license): improve work with custom classification of licenses fr…
DmitriyLewen May 20, 2025
1dcf816
feat(nodejs): add bun.lock parser (#8851)
sneaky-potato May 20, 2025
fe12771
fix(k8s): use in-memory cache backend during misconfig scanning (#8873)
nikpivkin May 21, 2025
39f9ed1
feat(license): Support compound licenses (licenses using SPDX operato…
JonatanLindstrom May 21, 2025
0229eb7
refactor(license): simplify compound license scanning (#8896)
knqyf263 May 21, 2025
6b67628
Merge remote-tracking branch 'aqua/main' into stevenmasley/module_out…
Emyrk May 21, 2025
a979854
chore: leave `null` counts as 1, not sure what to do with them
Emyrk May 21, 2025
bcf246c
chore(deps): bump the common group across 1 directory with 9 updates …
dependabot[bot] May 22, 2025
cae79d6
chore(deps): bump github.com/containerd/containerd/v2 from 2.1.0 to 2…
dependabot[bot] May 22, 2025
ee52230
feat(license): improve work text licenses with custom classification …
DmitriyLewen May 22, 2025
07ef63b
feat: add Bottlerocket OS package analyzer (#8653)
0intro May 23, 2025
93e6680
fix: check post-analyzers for StaticPaths (#8904)
knqyf263 May 23, 2025
347b7ce
feat: terraform parser option to set current working directory
Emyrk May 23, 2025
6c7cb7a
refactor(terraform): simplify AllReferences method signature in Attri…
nikpivkin May 24, 2025
aaecc29
feat(misconf): export raw Terraform data to Rego (#8741)
nikpivkin May 27, 2025
60fef1b
perf(secret): only match secrets of meaningful length, allow example …
PT-GD May 27, 2025
fe2237b
use empty string as undefined
Emyrk May 27, 2025
5a727ac
Merge branch 'coder/module_output_count' into dynamic-parameters
Emyrk May 27, 2025
3c72a59
Merge branch 'stevenmasley/evaluate_step_hook' into dynamic-parameters
Emyrk May 27, 2025
bee4dda
Merge remote-tracking branch 'coder/stevenmasley/cwd' into dynamic-pa…
Emyrk May 27, 2025
9416a59
compile fix on test
Emyrk May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/maintainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Maintainer
about: Create an issue by maintainers
title: ''
labels: ''
assignees: ''

---

## Are you a maintainer of the Trivy project?
If not, please open [a discussion](https://github.com/aquasecurity/trivy/discussions); if you are, please review [the guideline](https://trivy.dev/latest/community/contribute/discussion/).
33 changes: 0 additions & 33 deletions .github/workflows/publish-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
- main
paths:
- 'helm/trivy/**'
push:
tags:
- "v*"
env:
HELM_REP: helm-charts
GH_OWNER: aquasecurity
Expand All @@ -25,7 +22,6 @@ env:
jobs:
# `test-chart` job starts if a PR with Helm Chart is created, merged etc.
test-chart:
if: github.event_name != 'push'
runs-on: ubuntu-24.04
steps:
- name: Checkout
Expand Down Expand Up @@ -56,35 +52,6 @@ jobs:
sed -i -e '136s,false,'true',g' ./helm/trivy/values.yaml
ct lint-and-install --validate-maintainers=false --charts helm/trivy

# `update-chart-version` job starts if a new tag is pushed
update-chart-version:
if: github.event_name == 'push'
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Install Go tools
run: go install tool # GOBIN is added to the PATH by the setup-go action

- name: Create a PR with Trivy version
run: mage helm:updateVersion
env:
# Use ORG_REPO_TOKEN instead of GITHUB_TOKEN
# This allows the created PR to trigger tests and other workflows
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}

# `publish-chart` job starts if a PR with a new Helm Chart is merged or manually
publish-chart:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,33 @@ jobs:

- name: Create deb repository
run: ci/deploy-deb.sh

# `update-chart-version` creates a new PR for updating the helm chart
update-chart-version:
needs: deploy-packages
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Install Go tools
run: go install tool # GOBIN is added to the PATH by the setup-go action

- name: Create a PR with Trivy version
run: mage helm:updateVersion
env:
# Use ORG_REPO_TOKEN instead of GITHUB_TOKEN
# This allows the created PR to trigger tests and other workflows
GITHUB_TOKEN: ${{ secrets.ORG_REPO_TOKEN }}
84 changes: 70 additions & 14 deletions .github/workflows/semantic-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
name: "Lint PR title"
name: "Validate PR Title"

on:
pull_request_target:
pull_request:
types:
- opened
- edited
- synchronize

jobs:
main:
validate:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
- name: Validate PR title
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
PR_TITLE: ${{ github.event.pull_request.title }}
# Valid types
VALID_TYPES: |
feat
fix
docs
Expand All @@ -29,13 +30,15 @@ jobs:
chore
revert
release

scopes: |
# Valid scopes categorized by area
VALID_SCOPES: |
# Scanners
vuln
misconf
secret
license

# Targets
image
fs
repo
Expand All @@ -46,6 +49,7 @@ jobs:
vm
plugin

# OS
alpine
wolfi
chainguard
Expand All @@ -62,6 +66,7 @@ jobs:
distroless
windows

# Languages
ruby
php
python
Expand All @@ -71,37 +76,88 @@ jobs:
java
go
c
c\+\+
c++
elixir
dart
swift
bitnami
conda
julia

# Package types
os
lang

# IaC
kubernetes
dockerfile
terraform
cloudformation

# Container
docker
podman
containerd
oci

# SBOM
sbom
spdx
cyclonedx

# Misc
cli
flag

cyclonedx
spdx
purl
vex

helm
report
db
parser
deps
run: |
set -euo pipefail

# Convert env vars to regex alternatives, excluding comments and empty lines
TYPES_REGEX=$(echo "$VALID_TYPES" | grep -v '^$' | paste -sd '|')
SCOPES_REGEX=$(echo "$VALID_SCOPES" | grep -v '^$' | grep -v '^#' | paste -sd '|')

# Basic format check (should match: type(scope): description or type: description)
FORMAT_REGEX="^[a-z]+(\([a-z0-9+]+\))?!?: .+$"
if ! echo "$PR_TITLE" | grep -qE "$FORMAT_REGEX"; then
echo "Error: Invalid PR title format"
echo "Expected format: <type>(<scope>): <description> or <type>: <description>"
echo "Examples:"
echo " feat(vuln): add new vulnerability detection"
echo " fix: correct parsing logic"
echo " docs(kubernetes): update installation guide"
echo -e "\nCurrent title: $PR_TITLE"
exit 1
fi

# Extract type and scope for validation
TYPE=$(echo "$PR_TITLE" | sed -E 's/^([a-z]+)(\([a-z0-9+]+\))?!?: .+$/\1/')
SCOPE=$(echo "$PR_TITLE" | sed -E 's/^[a-z]+\(([a-z0-9+]+)\)!?: .+$/\1/; t; s/.*//')

# Validate type
if ! echo "$VALID_TYPES" | grep -qx "$TYPE"; then
echo "Error: Invalid type '${TYPE}'"
echo -e "\nValid types:"
echo "$VALID_TYPES" | grep -v '^$' | sed 's/^/- /'
echo -e "\nCurrent title: $PR_TITLE"
exit 1
fi

# Validate scope if present
if [ -n "$SCOPE" ]; then
if ! echo "$VALID_SCOPES" | grep -v '^#' | grep -qx "$SCOPE"; then
echo "Error: Invalid scope '${SCOPE}'"
echo -e "\nValid scopes:"
echo "$VALID_SCOPES" | grep -v '^$' | grep -v '^#' | sed 's/^/- /'
echo -e "\nCurrent title: $PR_TITLE"
exit 1
fi
fi

echo "PR title validation passed ✅"
echo "Current title: $PR_TITLE"
5 changes: 1 addition & 4 deletions .github/workflows/spdx-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ jobs:
fi

- name: Microsoft Teams Notification
## Until the PR with the fix for the AdaptivCard version is merged yet
## https://github.com/Skitionek/notify-microsoft-teams/pull/96
## Use the aquasecurity fork
uses: aquasecurity/notify-microsoft-teams@master
uses: Skitionek/notify-microsoft-teams@e7a2493ac87dad8aa7a62f079f295e54ff511d88
if: failure()
with:
webhook_url: ${{ secrets.TRIVY_MSTEAMS_WEBHOOK }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:

- name: Lint
id: lint
uses: golangci/golangci-lint-action@v6.5.0
uses: golangci/golangci-lint-action@v7.0.0
with:
version: v1.64
args: --verbose --out-format=line-number
version: v2.1
args: --verbose
if: matrix.operating-system == 'ubuntu-latest'

- name: Check if linter failed
Expand Down
Loading
Loading