Compare commits

...

41 Commits

Author SHA1 Message Date
dependabot[bot]
d71b747cd1
chore(deps): bump slackapi/slack-github-action from 2.1.1 to 3.0.1 (#4684)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 2.1.1 to 3.0.1.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](91efab103c...af78098f53)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 11:12:33 -04:00
dependabot[bot]
58a8a95e26
chore(deps): bump marocchino/sticky-pull-request-comment (#4685)
Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.9.4 to 3.0.2.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](773744901b...70d2764d1a)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 19:27:59 -04:00
dependabot[bot]
78a21b9c88
chore(deps): bump the go-minor-patch group with 2 updates (#4697)
Bumps the go-minor-patch group with 2 updates: [github.com/gkampitakis/go-snaps](https://github.com/gkampitakis/go-snaps) and [modernc.org/sqlite](https://gitlab.com/cznic/sqlite).


Updates `github.com/gkampitakis/go-snaps` from 0.5.20 to 0.5.21
- [Release notes](https://github.com/gkampitakis/go-snaps/releases)
- [Commits](https://github.com/gkampitakis/go-snaps/compare/v0.5.20...v0.5.21)

Updates `modernc.org/sqlite` from 1.46.1 to 1.46.2
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.46.1...v1.46.2)

---
updated-dependencies:
- dependency-name: github.com/gkampitakis/go-snaps
  dependency-version: 0.5.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-minor-patch
- dependency-name: modernc.org/sqlite
  dependency-version: 1.46.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 19:27:50 -04:00
dependabot[bot]
7d3882a425
chore(deps): bump actions/create-github-app-token from 2.2.1 to 3.0.0 (#4699)
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 2.2.1 to 3.0.0.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](29824e69f5...f8d387b68d)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 19:27:31 -04:00
anchore-actions-token-generator[bot]
673c85754c
chore(deps): update CPE dictionary index (#4689)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: wagoodman <590471+wagoodman@users.noreply.github.com>
2026-03-25 08:38:49 -04:00
Will Murphy
c5114fd745
chore(deps): ignore some dependabot deps (#4696)
Prevent some packages from being updated.

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
2026-03-24 08:12:50 -04:00
Weston Steimel
f68a7cc899
ci: further pr target code checkout assurances (#4695)
Signed-off-by: Weston Steimel <author@code.w.steimel.me.uk>
2026-03-24 07:16:16 -04:00
witchcraze
7800b16529
fix: update arangodb classifier and capture-snippet.sh (#4662)
Signed-off-by: witchcraze <witchcraze@gmail.com>
2026-03-23 16:29:39 -04:00
Keith Zantow
834ddcb1c0
fix: golang version file regex (#4694)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2026-03-23 15:56:29 -04:00
Weston Steimel
f5d318d934
ci: add explicit ref to main and warning for pull_request_target workflow (#4693)
Signed-off-by: Weston Steimel <author@code.w.steimel.me.uk>
2026-03-23 16:45:18 +00:00
anchore-actions-token-generator[bot]
8531e1917b
chore(deps): update tools to latest versions (#4690)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com>
2026-03-23 12:01:27 -04:00
anchore-actions-token-generator[bot]
860126c650
chore(deps): update anchore dependencies (#4681)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: willmurphyscode <12529630+willmurphyscode@users.noreply.github.com>
2026-03-19 16:44:55 +00:00
Will Murphy
36639f136b
chore(deps): bump github.com/buger/jsonsparser to v1.1.2 (#4680)
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
2026-03-19 15:08:18 +00:00
dependabot[bot]
f32238c268
chore(deps): bump the go-minor-patch group with 2 updates (#4678)
Bumps the go-minor-patch group with 2 updates: [golang.org/x/net](https://github.com/golang/net) and [golang.org/x/tools](https://github.com/golang/tools).


Updates `golang.org/x/net` from 0.51.0 to 0.52.0
- [Commits](https://github.com/golang/net/compare/v0.51.0...v0.52.0)

Updates `golang.org/x/tools` from 0.42.0 to 0.43.0
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.42.0...v0.43.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.52.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: golang.org/x/tools
  dependency-version: 0.43.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-19 10:25:19 -04:00
dependabot[bot]
0c8eef65f0
chore(deps): bump google.golang.org/grpc from 1.78.0 to 1.79.3 (#4675)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.78.0 to 1.79.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.78.0...v1.79.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.79.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-18 16:55:30 -04:00
dependabot[bot]
4d42f8af32
chore(deps): bump the go-minor-patch group with 2 updates (#4674)
Bumps the go-minor-patch group with 2 updates: [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) and [golang.org/x/mod](https://github.com/golang/mod).


Updates `github.com/hashicorp/go-getter` from 1.8.4 to 1.8.5
- [Release notes](https://github.com/hashicorp/go-getter/releases)
- [Commits](https://github.com/hashicorp/go-getter/compare/v1.8.4...v1.8.5)

Updates `golang.org/x/mod` from 0.33.0 to 0.34.0
- [Commits](https://github.com/golang/mod/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-getter
  dependency-version: 1.8.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-minor-patch
- dependency-name: golang.org/x/mod
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-18 16:13:35 -04:00
Will Murphy
e38851143e
chore: centralize temp files and prefer streaming IO (#4668)
* chore: centralize temp files and prefer streaming IO

Catalogers that create temp files ad-hoc can easily forget cleanup,
leaking files on disk. Similarly, io.ReadAll is convenient but risks
OOM on large or malicious inputs.

Introduce internal/tmpdir to manage all cataloger temp storage under
a single root directory with automatic cleanup. Prefer streaming
parsers (bufio.Scanner, json/yaml.NewDecoder, io.LimitReader) over
buffering entire inputs into memory. Add ruleguard rules to enforce
both practices going forward.

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

* chore: go back to old release parsing

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

* simplify to limit reader in version check

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

* chore: regex change postponed

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

* simplify supplement release to limitreader

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

---------

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
2026-03-18 10:53:51 -04:00
anchore-actions-token-generator[bot]
a3dacf5ecd
chore(deps): update tools to latest versions (#4663)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com>
2026-03-16 11:26:06 -04:00
dependabot[bot]
cccc9bf7f9
chore(deps): bump the go-minor-patch group with 3 updates (#4669)
Bumps the go-minor-patch group with 3 updates: [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry), [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) and [golang.org/x/time](https://github.com/golang/time).


Updates `github.com/google/go-containerregistry` from 0.21.1 to 0.21.2
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.21.1...v0.21.2)

Updates `github.com/olekukonko/tablewriter` from 1.1.3 to 1.1.4
- [Release notes](https://github.com/olekukonko/tablewriter/releases)
- [Commits](https://github.com/olekukonko/tablewriter/compare/v1.1.3...v1.1.4)

Updates `golang.org/x/time` from 0.14.0 to 0.15.0
- [Commits](https://github.com/golang/time/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-version: 0.21.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-minor-patch
- dependency-name: github.com/olekukonko/tablewriter
  dependency-version: 1.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-minor-patch
- dependency-name: golang.org/x/time
  dependency-version: 0.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 11:25:41 -04:00
dependabot[bot]
59f7725d0d
chore(deps): bump github/codeql-action (#4670)
Bumps the actions-minor-patch group with 1 update in the / directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.32.3 to 4.32.6
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](9e907b5e64...0d579ffd05)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 11:25:27 -04:00
dependabot[bot]
7a6b1575ae
chore(deps): bump docker/login-action from 3.7.0 to 4.0.0 (#4671)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.7.0 to 4.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](c94ce9fb46...b45d80f862)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 11:25:16 -04:00
anchore-actions-token-generator[bot]
92a6b36e89
chore(deps): update CPE dictionary index (#4673)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: wagoodman <590471+wagoodman@users.noreply.github.com>
2026-03-16 11:25:05 -04:00
Will Murphy
7158535fe6
chore(tests): fix test fixture build on modern ARM Mac (#4666)
BUILDPLATFORM is automatically set to the host's platform in new Docker,
so having it defined as an arg results in it being overridden by this
automatic value. Since it was always assigned to a literal string in the
test files, just use that string.

Additionally, image platform is better pulled from the manifest, not the
image config, in containerd store, so try that first.

Additionally, python3 is on PATH on new macs by default, but not python.

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
2026-03-11 09:37:40 -04:00
anchore-actions-token-generator[bot]
75455f050a
chore(deps): update anchore dependencies (#4631)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: willmurphyscode <12529630+willmurphyscode@users.noreply.github.com>
2026-03-09 18:10:53 +00:00
anchore-actions-token-generator[bot]
22e78c7be1
chore(deps): update tools to latest versions (#4630)
* chore(deps): update tools to latest versions

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(lint): fix errors in new golangci-lint

Two fixes:

First, replace sb.WriteString(fmt.Sprintf(...)) with fmt.Fprintf(&sb, ...)
Second, suppress errors where we read from the local file system at a
user provided path. This is a CLI tool, and reads from user provided
paths on the local file system by design.

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
Co-authored-by: spiffcs <32073428+spiffcs@users.noreply.github.com>
Co-authored-by: Will Murphy <willmurphyscode@users.noreply.github.com>
2026-03-09 12:17:09 -04:00
anchore-actions-token-generator[bot]
d2461a9e0a
chore(deps): update SPDX license list (#4637)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: wagoodman <590471+wagoodman@users.noreply.github.com>
2026-03-09 11:02:47 -04:00
dependabot[bot]
01f0e332c2
chore(deps): bump actions/download-artifact from 7.0.0 to 8.0.0 (#4658)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](37930b1c2a...70fc10c6e5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 10:37:33 -04:00
dependabot[bot]
c88051d74e
chore(deps): bump github.com/cloudflare/circl from 1.6.1 to 1.6.3 (#4638)
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.6.1 to 1.6.3.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.6.1...v1.6.3)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-version: 1.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 10:34:11 -04:00
dependabot[bot]
7d3d1c6237
chore(deps): bump the actions-minor-patch group across 2 directories with 2 updates (#4657)
Bumps the actions-minor-patch group with 2 updates in the / directory: [actions/setup-go](https://github.com/actions/setup-go) and [anchore/sbom-action](https://github.com/anchore/sbom-action).
Bumps the actions-minor-patch group with 1 update in the /.github/actions/bootstrap directory: [actions/setup-go](https://github.com/actions/setup-go).


Updates `actions/setup-go` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](7a3fe6cf4c...4b73464bb3)

Updates `anchore/sbom-action` from 0.22.2 to 0.23.0
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](28d71544de...17ae174017)

Updates `actions/setup-go` from 6.2.0 to 6.3.0
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](7a3fe6cf4c...4b73464bb3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: anchore/sbom-action
  dependency-version: 0.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
- dependency-name: actions/setup-go
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 10:33:14 -04:00
dependabot[bot]
dcba765d86
chore(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 (#4659)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b7c566a772...bbbca2ddaa)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 10:32:22 -04:00
dependabot[bot]
2c201469c3
chore(deps): bump go.opentelemetry.io/otel/sdk from 1.39.0 to 1.40.0 (#4646)
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.39.0 to 1.40.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.39.0...v1.40.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.40.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 10:29:46 -04:00
anchore-actions-token-generator[bot]
c583da1c15
chore(deps): update CPE dictionary index (#4647)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: wagoodman <590471+wagoodman@users.noreply.github.com>
2026-03-09 10:26:42 -04:00
dependabot[bot]
22014b6022
chore(deps): bump the go-minor-patch group across 1 directory with 5 updates (#4661)
Bumps the go-minor-patch group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/github/go-spdx/v2](https://github.com/github/go-spdx) | `2.3.6` | `2.4.0` |
| [github.com/go-git/go-billy/v5](https://github.com/go-git/go-billy) | `5.7.0` | `5.8.0` |
| [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | `5.16.5` | `5.17.0` |
| [golang.org/x/net](https://github.com/golang/net) | `0.50.0` | `0.51.0` |
| [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) | `1.45.0` | `1.46.1` |



Updates `github.com/github/go-spdx/v2` from 2.3.6 to 2.4.0
- [Release notes](https://github.com/github/go-spdx/releases)
- [Commits](https://github.com/github/go-spdx/compare/v2.3.6...v2.4.0)

Updates `github.com/go-git/go-billy/v5` from 5.7.0 to 5.8.0
- [Release notes](https://github.com/go-git/go-billy/releases)
- [Commits](https://github.com/go-git/go-billy/compare/v5.7.0...v5.8.0)

Updates `github.com/go-git/go-git/v5` from 5.16.5 to 5.17.0
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.16.5...v5.17.0)

Updates `golang.org/x/net` from 0.50.0 to 0.51.0
- [Commits](https://github.com/golang/net/compare/v0.50.0...v0.51.0)

Updates `modernc.org/sqlite` from 1.45.0 to 1.46.1
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.45.0...v1.46.1)

---
updated-dependencies:
- dependency-name: github.com/github/go-spdx/v2
  dependency-version: 2.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: github.com/go-git/go-billy/v5
  dependency-version: 5.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: golang.org/x/net
  dependency-version: 0.51.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: modernc.org/sqlite
  dependency-version: 1.46.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 10:20:06 -04:00
Alex Goodman
b5e85c3ea5
chore: migrate fixtures to testdata (#4651)
* migrate fixtures to testdata

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix: correct broken symlinks after testdata migration

The migration from test-fixtures to testdata broke several symlinks:
- elf-test-fixtures symlinks pointed to old test-fixtures paths
- elf-test-fixtures needed to be renamed to elf-testdata
- image-pkg-coverage symlink pointed to test-fixtures instead of testdata

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix: handle missing classifiers/bin directory in Makefile

The clean-fingerprint target was failing when classifiers/bin doesn't
exist (e.g., on fresh clone without downloaded binaries).

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix: add gitignore negation for jar/zip fixtures in test/cli

The jar and zip files in test/cli/testdata/image-unknowns were being
gitignored by the root .gitignore patterns. This caused them to be
untracked and not included when building docker images in CI, resulting
in Test_Unknowns failures since the test expects errors from corrupt
archive files that weren't present.

Add a .gitignore in test/cli/testdata to negate the exclusions for
these specific test fixture files.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* switch fixture cache to v2

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* test: update expected versions for rebuilt fixtures

Update test expectations for packages that have been updated in
upstream repositories when docker images are rebuilt:
- glibc: 2.42-r4 → 2.43-r1 (wolfi)
- php: 8.2.29 → 8.2.30 (ubuntu/apache)

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* upgrade go

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix: add go-shlex dependency for testdata manager tool

The manager tool in syft/pkg/cataloger/binary/testdata/ imports
go-shlex, but since it's in a testdata directory, Go doesn't track
its dependencies. This caused CI failures when go.mod didn't
explicitly list the dependency.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* refactor: move binary classifier manager to internal/

Move the manager tool from testdata/manager to internal/manager so
that Go properly tracks its dependencies. Code in testdata directories
is ignored by Go for dependency tracking, which caused CI failures
when go.mod didn't explicitly list transitive dependencies.

This is a cleaner solution than manually adding dependencies to go.mod
for code that happens to live in testdata.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix: add gitignore negations for test fixtures blocked by root patterns

Multiple test fixtures were being blocked by root-level gitignore patterns
like bin/, *.jar, *.tar, and *.exe. This adds targeted .gitignore files with
negation patterns to allow these specific test fixtures to be tracked:

- syft/linux/testdata/os/busybox/bin/busybox (blocked by bin/)
- syft/pkg/cataloger/java/testdata/corrupt/example.{jar,tar} (blocked by *.jar, *.tar)
- syft/pkg/cataloger/binary/testdata/classifiers/snippets/go-version-hint/**/bin/go (blocked by bin/)
- syft/pkg/cataloger/bitnami/testdata/no-rel/.../bin/redis-server (blocked by bin/)

Also updates the bitnami test expectation to include the newly required
.gitignore files in the test fixture.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* test: update glibc version expectation (2.43-r1 -> 2.43-r2)

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* add capability drift check as unit step

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* dont clear test observations before drift detection

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* bump stereoscope commit to main

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2026-03-06 19:42:04 +00:00
Dimitri John Ledkov
35278f3d3d
fix(java): improve lz4 detection (#4642)
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@surgut.co.uk>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Co-authored-by: Keith Zantow <kzantow@gmail.com>
2026-02-27 14:38:05 -05:00
Paweł Pałucha
db76d85d51
fix: use correct hashes for empty files (#4620)
Signed-off-by: Paweł Pałucha <pawel.palucha@chainguard.dev>
2026-02-24 09:52:29 -05:00
witchcraze
e9e7e20cc8
fix: grafana classifier (#4635)
Signed-off-by: witchcraze <witchcraze@gmail.com>
2026-02-23 09:38:02 -05:00
anchore-actions-token-generator[bot]
eb072deb9c
chore(deps): update CPE dictionary index (#4636)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: wagoodman <590471+wagoodman@users.noreply.github.com>
2026-02-23 08:19:30 -05:00
dependabot[bot]
f4fc2d669a
chore(deps): bump github/codeql-action (#4634)
Bumps the actions-minor-patch group with 1 update in the / directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 4.31.10 to 4.32.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](cdefb33c0f...9e907b5e64)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-20 08:41:46 -05:00
dependabot[bot]
f5110f109a
chore(deps): bump github.com/charmbracelet/bubbles from 0.21.1 to 1.0.0 (#4633)
Bumps [github.com/charmbracelet/bubbles](https://github.com/charmbracelet/bubbles) from 0.21.1 to 1.0.0.
- [Release notes](https://github.com/charmbracelet/bubbles/releases)
- [Commits](https://github.com/charmbracelet/bubbles/compare/v0.21.1...v1.0.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbles
  dependency-version: 1.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-20 08:41:21 -05:00
dependabot[bot]
612eadb22e
chore(deps): bump the go-minor-patch group with 5 updates (#4632)
Bumps the go-minor-patch group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [golang.org/x/mod](https://github.com/golang/mod) | `0.32.0` | `0.33.0` |
| [golang.org/x/net](https://github.com/golang/net) | `0.49.0` | `0.50.0` |
| [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) | `1.44.3` | `1.45.0` |
| [golang.org/x/tools](https://github.com/golang/tools) | `0.41.0` | `0.42.0` |
| [github.com/gpustack/gguf-parser-go](https://github.com/gpustack/gguf-parser-go) | `0.23.1` | `0.24.0` |


Updates `golang.org/x/mod` from 0.32.0 to 0.33.0
- [Commits](https://github.com/golang/mod/compare/v0.32.0...v0.33.0)

Updates `golang.org/x/net` from 0.49.0 to 0.50.0
- [Commits](https://github.com/golang/net/compare/v0.49.0...v0.50.0)

Updates `modernc.org/sqlite` from 1.44.3 to 1.45.0
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.44.3...v1.45.0)

Updates `golang.org/x/tools` from 0.41.0 to 0.42.0
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.41.0...v0.42.0)

Updates `github.com/gpustack/gguf-parser-go` from 0.23.1 to 0.24.0
- [Release notes](https://github.com/gpustack/gguf-parser-go/releases)
- [Commits](https://github.com/gpustack/gguf-parser-go/compare/v0.23.1...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: golang.org/x/net
  dependency-version: 0.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: modernc.org/sqlite
  dependency-version: 1.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: golang.org/x/tools
  dependency-version: 0.42.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
- dependency-name: github.com/gpustack/gguf-parser-go
  dependency-version: 0.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-minor-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-20 08:40:09 -05:00
1659 changed files with 2822 additions and 1547 deletions

View File

@ -2,7 +2,7 @@ tools:
# we want to use a pinned version of binny to manage the toolchain (so binny manages itself!) # we want to use a pinned version of binny to manage the toolchain (so binny manages itself!)
- name: binny - name: binny
version: version:
want: v0.11.3 want: v0.12.0
method: github-release method: github-release
with: with:
repo: anchore/binny repo: anchore/binny
@ -18,7 +18,7 @@ tools:
# used to sign mac binaries at release # used to sign mac binaries at release
- name: quill - name: quill
version: version:
want: v0.5.1 want: v0.7.1
method: github-release method: github-release
with: with:
repo: anchore/quill repo: anchore/quill
@ -26,7 +26,7 @@ tools:
# used for linting # used for linting
- name: golangci-lint - name: golangci-lint
version: version:
want: v2.9.0 want: v2.11.4
method: github-release method: github-release
with: with:
repo: golangci/golangci-lint repo: golangci/golangci-lint
@ -42,7 +42,7 @@ tools:
# used for signing the checksums file at release # used for signing the checksums file at release
- name: cosign - name: cosign
version: version:
want: v3.0.4 want: v3.0.5
method: github-release method: github-release
with: with:
repo: sigstore/cosign repo: sigstore/cosign
@ -58,7 +58,7 @@ tools:
# used to release all artifacts # used to release all artifacts
- name: goreleaser - name: goreleaser
version: version:
want: v2.13.3 want: v2.14.3
method: github-release method: github-release
with: with:
repo: goreleaser/goreleaser repo: goreleaser/goreleaser
@ -90,7 +90,7 @@ tools:
# used for running all local and CI tasks # used for running all local and CI tasks
- name: task - name: task
version: version:
want: v3.48.0 want: v3.49.1
method: github-release method: github-release
with: with:
repo: go-task/task repo: go-task/task
@ -98,7 +98,7 @@ tools:
# used for triggering a release # used for triggering a release
- name: gh - name: gh
version: version:
want: v2.86.0 want: v2.88.1
method: github-release method: github-release
with: with:
repo: cli/cli repo: cli/cli
@ -106,7 +106,7 @@ tools:
# used to upload test fixture cache # used to upload test fixture cache
- name: oras - name: oras
version: version:
want: v1.3.0 want: v1.3.1
method: github-release method: github-release
with: with:
repo: oras-project/oras repo: oras-project/oras

View File

@ -5,7 +5,7 @@ inputs:
go-version: go-version:
description: "Go version to install" description: "Go version to install"
required: true required: true
default: "1.25.x" default: "1.26.x"
go-dependencies: go-dependencies:
description: "Download go dependencies" description: "Download go dependencies"
required: true required: true
@ -29,7 +29,7 @@ runs:
using: "composite" using: "composite"
steps: steps:
# note: go mod and build is automatically cached on default with v4+ # note: go mod and build is automatically cached on default with v4+
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
if: inputs.go-version != '' if: inputs.go-version != ''
with: with:
go-version: ${{ inputs.go-version }} go-version: ${{ inputs.go-version }}

View File

@ -23,6 +23,11 @@ updates:
open-pull-requests-limit: 10 open-pull-requests-limit: 10
labels: labels:
- "dependencies" - "dependencies"
ignore:
- dependency-name: "github.com/aquasecurity/go-pep440-version"
- dependency-name: "github.com/aquasecurity/go-version"
- dependency-name: "github.com/knqyf263/go-apk-version"
- dependency-name: "github.com/knqyf263/go-deb-version"
groups: groups:
go-minor-patch: go-minor-patch:
applies-to: version-updates # security updates get individual PRs applies-to: version-updates # security updates get individual PRs

View File

@ -6,7 +6,7 @@ if [ "$(git status --porcelain | wc -l)" -ne "0" ]; then
exit 1 exit 1
fi fi
if ! make generate-capabilities; then if ! make generate-capabilities REFRESH=false; then
echo "Generating capability descriptions failed" echo "Generating capability descriptions failed"
exit 1 exit 1
fi fi

View File

@ -33,9 +33,9 @@ def is_git_tracked_or_untracked(directory):
def find_test_fixture_dirs_with_images(base_dir): def find_test_fixture_dirs_with_images(base_dir):
"""Find directories that contain 'test-fixtures' and at least one 'image-*' directory.""" """Find directories that contain 'testdata' and at least one 'image-*' directory."""
for root, dirs, files in os.walk(base_dir): for root, dirs, files in os.walk(base_dir):
if 'test-fixtures' in root: if 'testdata' in root:
image_dirs = [d for d in dirs if d.startswith('image-')] image_dirs = [d for d in dirs if d.startswith('image-')]
if image_dirs: if image_dirs:
yield os.path.realpath(root) yield os.path.realpath(root)

View File

@ -41,14 +41,14 @@ jobs:
persist-credentials: false persist-credentials: false
- name: Install Go - name: Install Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 #v6.2.0 uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 #v6.3.0
with: with:
go-version-file: go.mod go-version-file: go.mod
check-latest: true check-latest: true
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10 uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10 uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@ -73,4 +73,4 @@ jobs:
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10 uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6

View File

@ -37,6 +37,8 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with: with:
persist-credentials: false persist-credentials: false
repository: anchore/syft # IMPORTANT! An additional protection that this is checking out code from the expected repository
ref: main # IMPORTANT! It is CRITICAL that this only ever considers the code from main and NEVER EVER from a fork.
- run: python .github/scripts/labeler.py - run: python .github/scripts/labeler.py
env: env:
@ -46,7 +48,7 @@ jobs:
- name: Delete existing comment - name: Delete existing comment
if: ${{ hashFiles( env.CI_COMMENT_FILE ) == '' }} if: ${{ hashFiles( env.CI_COMMENT_FILE ) == '' }}
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2.9.4 uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 #v3.0.2
with: with:
header: ${{ env.COMMENT_HEADER }} header: ${{ env.COMMENT_HEADER }}
hide: true hide: true
@ -54,7 +56,7 @@ jobs:
- name: Add comment - name: Add comment
if: ${{ hashFiles( env.CI_COMMENT_FILE ) != '' }} if: ${{ hashFiles( env.CI_COMMENT_FILE ) != '' }}
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 #v2.9.4 uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 #v3.0.2
with: with:
header: ${{ env.COMMENT_HEADER }} header: ${{ env.COMMENT_HEADER }}
path: ${{ env.CI_COMMENT_FILE }} path: ${{ env.CI_COMMENT_FILE }}

View File

@ -150,13 +150,13 @@ jobs:
uses: ./.github/actions/bootstrap uses: ./.github/actions/bootstrap
- name: Login to Docker Hub - name: Login to Docker Hub
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 #v3.7.0 uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 #v4.0.0
with: with:
username: ${{ secrets.ANCHOREOSSWRITE_DH_USERNAME }} username: ${{ secrets.ANCHOREOSSWRITE_DH_USERNAME }}
password: ${{ secrets.ANCHOREOSSWRITE_DH_PAT }} password: ${{ secrets.ANCHOREOSSWRITE_DH_PAT }}
- name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 #v3.7.0 uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 #v4.0.0
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
@ -186,14 +186,14 @@ jobs:
# for updating brew formula in anchore/homebrew-syft # for updating brew formula in anchore/homebrew-syft
GITHUB_BREW_TOKEN: ${{ secrets.ANCHOREOPS_GITHUB_OSS_WRITE_TOKEN }} GITHUB_BREW_TOKEN: ${{ secrets.ANCHOREOPS_GITHUB_OSS_WRITE_TOKEN }}
- uses: anchore/sbom-action@28d71544de8eaf1b958d335707167c5f783590ad #v0.22.2 - uses: anchore/sbom-action@17ae1740179002c89186b61233e0f892c3118b11 #v0.23.0
continue-on-error: true continue-on-error: true
with: with:
file: go.mod file: go.mod
artifact-name: sbom.spdx.json artifact-name: sbom.spdx.json
- name: Notify Slack of new release - name: Notify Slack of new release
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a #v2.1.1 uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 #v3.0.1
continue-on-error: true continue-on-error: true
with: with:
webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }} webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}

View File

@ -31,7 +31,7 @@ jobs:
with: with:
repos: ${{ github.event.inputs.repos }} repos: ${{ github.event.inputs.repos }}
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf #v2.2.1 - uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 #v3.0.0
id: generate-token id: generate-token
with: with:
app-id: ${{ secrets.TOKEN_APP_ID }} app-id: ${{ secrets.TOKEN_APP_ID }}

View File

@ -45,7 +45,7 @@ jobs:
echo "\`\`\`" echo "\`\`\`"
} >> $GITHUB_STEP_SUMMARY } >> $GITHUB_STEP_SUMMARY
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf #v2.2.1 - uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 #v3.0.0
id: generate-token id: generate-token
with: with:
app-id: ${{ secrets.TOKEN_APP_ID }} app-id: ${{ secrets.TOKEN_APP_ID }}

View File

@ -46,7 +46,7 @@ jobs:
- name: Push updated CPE cache to registry - name: Push updated CPE cache to registry
run: make generate:cpe-index:cache:push run: make generate:cpe-index:cache:push
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf #v2.2.1 - uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 #v3.0.0
id: generate-token id: generate-token
with: with:
app-id: ${{ secrets.TOKEN_APP_ID }} app-id: ${{ secrets.TOKEN_APP_ID }}
@ -65,7 +65,7 @@ jobs:
token: ${{ steps.generate-token.outputs.token }} token: ${{ steps.generate-token.outputs.token }}
- name: Notify Slack on failure - name: Notify Slack on failure
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a #v2.1.1 uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 #v3.0.1
with: with:
webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }} webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
webhook-type: incoming-webhook webhook-type: incoming-webhook

View File

@ -45,7 +45,7 @@ jobs:
token: ${{ steps.generate-token.outputs.token }} token: ${{ steps.generate-token.outputs.token }}
- name: Notify Slack on failure - name: Notify Slack on failure
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a #v2.1.1 uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 #v3.0.1
with: with:
webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }} webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
webhook-type: incoming-webhook webhook-type: incoming-webhook

View File

@ -58,6 +58,9 @@ jobs:
- name: Run unit tests - name: Run unit tests
run: make unit run: make unit
- name: Check for capability drift
run: make check-capability-drift
Integration-Test: Integration-Test:
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline # Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
name: "Integration tests" name: "Integration tests"
@ -106,7 +109,7 @@ jobs:
run: make snapshot-smoke-test run: make snapshot-smoke-test
- name: Upload snapshot artifacts - name: Upload snapshot artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0 uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7.0.0
with: with:
name: snapshot name: snapshot
path: snapshot/ path: snapshot/
@ -131,7 +134,7 @@ jobs:
download-test-fixture-cache: true download-test-fixture-cache: true
- name: Download snapshot artifacts - name: Download snapshot artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 #v8.0.0
with: with:
name: snapshot name: snapshot
path: snapshot path: snapshot
@ -175,7 +178,7 @@ jobs:
download-test-fixture-cache: true download-test-fixture-cache: true
- name: Download snapshot artifacts - name: Download snapshot artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 #v8.0.0
with: with:
name: snapshot name: snapshot
path: snapshot path: snapshot
@ -208,7 +211,7 @@ jobs:
download-test-fixture-cache: true download-test-fixture-cache: true
- name: Download snapshot artifacts - name: Download snapshot artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 #v8.0.0
with: with:
name: snapshot name: snapshot
path: snapshot path: snapshot

1
.gitignore vendored
View File

@ -37,6 +37,7 @@ VERSION
coverage.txt coverage.txt
*.log *.log
**/test-fixtures/test-observations.json **/test-fixtures/test-observations.json
**/testdata/test-observations.json
# probable archives # probable archives
.images .images

View File

@ -8,7 +8,9 @@ vars:
OWNER: anchore OWNER: anchore
PROJECT: syft PROJECT: syft
CACHE_IMAGE: ghcr.io/{{ .OWNER }}/{{ .PROJECT }}/test-fixture-cache:latest # v1: when fixtures were located at test-fixtures dirs
# v2: migration to testdata dirs
CACHE_IMAGE: ghcr.io/{{ .OWNER }}/{{ .PROJECT }}/test-fixture-cache:v2
# static file dirs # static file dirs
TOOL_DIR: .tool TOOL_DIR: .tool
@ -73,7 +75,6 @@ tasks:
- task: check-licenses - task: check-licenses
- task: lint - task: lint
- task: check-json-schema-drift - task: check-json-schema-drift
- task: check-capability-drift
- task: check-binary-fixture-size - task: check-binary-fixture-size
test: test:
@ -199,7 +200,7 @@ tasks:
check-binary-fixture-size: check-binary-fixture-size:
desc: Ensure that the binary test fixtures are not too large desc: Ensure that the binary test fixtures are not too large
cmds: cmds:
- .github/scripts/check_binary_fixture_size.sh syft/pkg/cataloger/binary/test-fixtures/classifiers/snippets - .github/scripts/check_binary_fixture_size.sh syft/pkg/cataloger/binary/testdata/classifiers/snippets
## Testing tasks ################################# ## Testing tasks #################################
@ -266,9 +267,9 @@ tasks:
fingerprints: fingerprints:
desc: Generate fingerprints for all non-docker test fixture desc: Generate fingerprints for all non-docker test fixture
silent: true silent: true
# this will look for `test-fixtures/Makefile` and invoke the `fingerprint` target to calculate all cache input fingerprint files # this will look for `testdata/Makefile` and invoke the `fingerprint` target to calculate all cache input fingerprint files
generates: generates:
- '**/test-fixtures/**/*.fingerprint' - '**/testdata/**/*.fingerprint'
- test/install/cache.fingerprint - test/install/cache.fingerprint
cmds: cmds:
- | - |
@ -277,7 +278,7 @@ tasks:
RESET='\033[0m' RESET='\033[0m'
echo -e "${YELLOW}creating fingerprint files for non-docker fixtures...${RESET}" echo -e "${YELLOW}creating fingerprint files for non-docker fixtures...${RESET}"
for dir in $(find . -type d -name 'test-fixtures'); do for dir in $(find . -type d -name 'testdata'); do
if [ -f "$dir/Makefile" ]; then if [ -f "$dir/Makefile" ]; then
# for debugging... # for debugging...
#echo -e "${YELLOW}• calculating fingerprints in $dir... ${RESET}" #echo -e "${YELLOW}• calculating fingerprints in $dir... ${RESET}"
@ -370,7 +371,7 @@ tasks:
build-fixtures: build-fixtures:
desc: Generate all non-docker test fixtures desc: Generate all non-docker test fixtures
silent: true silent: true
# this will look for `test-fixtures/Makefile` and invoke the `fixtures` target to generate any and all test fixtures # this will look for `testdata/Makefile` and invoke the `fixtures` target to generate any and all test fixtures
cmds: cmds:
- | - |
# we want to stop on the first build error # we want to stop on the first build error
@ -381,7 +382,7 @@ tasks:
RESET='\033[0m' RESET='\033[0m'
# Use a for loop with command substitution to avoid subshell issues # Use a for loop with command substitution to avoid subshell issues
for dir in $(find . -type d -name 'test-fixtures'); do for dir in $(find . -type d -name 'testdata'); do
if [ -f "$dir/Makefile" ]; then if [ -f "$dir/Makefile" ]; then
echo -e "${YELLOW}${BOLD}generating fixtures in $dir${RESET}" echo -e "${YELLOW}${BOLD}generating fixtures in $dir${RESET}"
make -C "$dir" fixtures make -C "$dir" fixtures
@ -435,7 +436,7 @@ tasks:
- "echo 'Docker daemon cache:'" - "echo 'Docker daemon cache:'"
- "docker images --format '{{`{{.ID}}`}} {{`{{.Repository}}`}}:{{`{{.Tag}}`}}' | grep stereoscope-fixture- | sort" - "docker images --format '{{`{{.ID}}`}} {{`{{.Repository}}`}}:{{`{{.Tag}}`}}' | grep stereoscope-fixture- | sort"
- "echo '\nTar cache:'" - "echo '\nTar cache:'"
- 'find . -type f -wholename "**/test-fixtures/cache/stereoscope-fixture-*.tar" | sort' - 'find . -type f -wholename "**/testdata/cache/stereoscope-fixture-*.tar" | sort'
check-docker-cache: check-docker-cache:
desc: Ensure docker caches aren't using too much disk space desc: Ensure docker caches aren't using too much disk space
@ -469,7 +470,7 @@ tasks:
- "cd test/install && make ci-test-mac" - "cd test/install && make ci-test-mac"
generate-compare-file: generate-compare-file:
cmd: "go run ./cmd/syft {{ .COMPARE_TEST_IMAGE }} -o json > {{ .COMPARE_DIR }}/test-fixtures/acceptance-{{ .COMPARE_TEST_IMAGE }}.json" cmd: "go run ./cmd/syft {{ .COMPARE_TEST_IMAGE }} -o json > {{ .COMPARE_DIR }}/testdata/acceptance-{{ .COMPARE_TEST_IMAGE }}.json"
compare-mac: compare-mac:
deps: [tmpdir] deps: [tmpdir]
@ -537,11 +538,16 @@ tasks:
deps: deps:
- tmpdir - tmpdir
- fixtures - fixtures
vars:
# set REFRESH=true to run package tests first and refresh test observations (default: true)
REFRESH: '{{ .REFRESH | default "true" }}'
cmds: cmds:
# remove all test observations prior to regenerating # remove all test observations prior to regenerating
- task: clean-test-observations - task: clean-test-observations
if: '{{ eq .REFRESH "true" }}'
# this is required to update test observations; such evidence is used to update the packages/*.yaml # this is required to update test observations; such evidence is used to update the packages/*.yaml
- "go test ./syft/pkg/... -count=1" - cmd: "go test ./syft/pkg/... -count=1"
if: '{{ eq .REFRESH "true" }}'
- "go generate ./internal/capabilities/..." - "go generate ./internal/capabilities/..."
- "gofmt -s -w ./internal/capabilities" - "gofmt -s -w ./internal/capabilities"
# now that we have the latest capabilities, run completeness tests to ensure this is self-consistent # now that we have the latest capabilities, run completeness tests to ensure this is self-consistent
@ -639,6 +645,15 @@ tasks:
## Cleanup targets ################################# ## Cleanup targets #################################
clean:
desc: Remove all cache files and old builds
cmds:
- task: clean-snapshot
- task: clean-cache
- task: clean-test-observations
- task: clean-docker-cache
- task: clean-oras-cache
clean-snapshot: clean-snapshot:
desc: Remove any snapshot builds desc: Remove any snapshot builds
cmds: cmds:
@ -648,7 +663,7 @@ tasks:
clean-docker-cache: clean-docker-cache:
desc: Remove all docker cache tars and images from the daemon desc: Remove all docker cache tars and images from the daemon
cmds: cmds:
- find . -type d -wholename "**/test-fixtures/cache" | xargs rm -rf - find . -type d -wholename "**/testdata/cache" | xargs rm -rf
- docker images --format '{{`{{.ID}}`}} {{`{{.Repository}}`}}' | grep stereoscope-fixture- | awk '{print $1}' | uniq | xargs -r docker rmi --force - docker images --format '{{`{{.ID}}`}} {{`{{.Repository}}`}}' | grep stereoscope-fixture- | awk '{print $1}' | uniq | xargs -r docker rmi --force
clean-oras-cache: clean-oras-cache:
@ -665,7 +680,7 @@ tasks:
RESET='\033[0m' RESET='\033[0m'
# Use a for loop with command substitution to avoid subshell issues # Use a for loop with command substitution to avoid subshell issues
for dir in $(find . -type d -name 'test-fixtures'); do for dir in $(find . -type d -name 'testdata'); do
if [ -f "$dir/Makefile" ]; then if [ -f "$dir/Makefile" ]; then
echo -e "${YELLOW}${BOLD}deleting ephemeral test fixtures in $dir${RESET}" echo -e "${YELLOW}${BOLD}deleting ephemeral test fixtures in $dir${RESET}"
(make -C "$dir" clean) (make -C "$dir" clean)
@ -675,6 +690,6 @@ tasks:
- rm -f {{ .LAST_CACHE_PULL_FILE }} {{ .CACHE_PATHS_FILE }} - rm -f {{ .LAST_CACHE_PULL_FILE }} {{ .CACHE_PATHS_FILE }}
clean-test-observations: clean-test-observations:
desc: Remove all test observations (i.e. test-fixtures/test-observations.json) desc: Remove all test observations (i.e. testdata/test-observations.json)
cmds: cmds:
- find . -type f -wholename "**/test-fixtures/test-observations.json" | xargs rm -f - find . -type f -wholename "**/testdata/test-observations.json" | xargs rm -f

View File

@ -219,7 +219,7 @@ func (l attestLogFrame) View() string {
sb := strings.Builder{} sb := strings.Builder{}
for _, line := range l.lines { for _, line := range l.lines {
sb.WriteString(fmt.Sprintf(" %s %s\n", l.borderStype.Render("░░"), line)) fmt.Fprintf(&sb, " %s %s\n", l.borderStype.Render("░░"), line)
} }
return sb.String() return sb.String()

View File

@ -49,7 +49,7 @@ func AppClioSetupConfig(id clio.Identification, out io.Writer) *clio.SetupConfig
}, },
). ).
WithPostRuns(func(_ *clio.State, _ error) { WithPostRuns(func(_ *clio.State, _ error) {
stereoscope.Cleanup() stereoscope.Cleanup() //nolint:staticcheck // we don't have access to the image object here
}) })
return clioCfg return clioCfg
} }

View File

@ -19,30 +19,30 @@ func Test_scanOptions_validateLegacyOptionsNotUsed(t *testing.T) {
}, },
{ {
name: "config file with no legacy options", name: "config file with no legacy options",
cfg: "test-fixtures/scan-configs/no-legacy-options.yaml", cfg: "testdata/scan-configs/no-legacy-options.yaml",
}, },
{ {
name: "config file with default image pull source legacy option", name: "config file with default image pull source legacy option",
cfg: "test-fixtures/scan-configs/with-default-pull-source.yaml", cfg: "testdata/scan-configs/with-default-pull-source.yaml",
wantErr: assertErrorContains("source.image.default-pull-source"), wantErr: assertErrorContains("source.image.default-pull-source"),
}, },
{ {
name: "config file with exclude-binary-overlap-by-ownership legacy option", name: "config file with exclude-binary-overlap-by-ownership legacy option",
cfg: "test-fixtures/scan-configs/with-exclude-binary-overlap-by-ownership.yaml", cfg: "testdata/scan-configs/with-exclude-binary-overlap-by-ownership.yaml",
wantErr: assertErrorContains("package.exclude-binary-overlap-by-ownership"), wantErr: assertErrorContains("package.exclude-binary-overlap-by-ownership"),
}, },
{ {
name: "config file with file string legacy option", name: "config file with file string legacy option",
cfg: "test-fixtures/scan-configs/with-file-string.yaml", cfg: "testdata/scan-configs/with-file-string.yaml",
wantErr: assertErrorContains("outputs"), wantErr: assertErrorContains("outputs"),
}, },
{ {
name: "config file with file section", name: "config file with file section",
cfg: "test-fixtures/scan-configs/with-file-section.yaml", cfg: "testdata/scan-configs/with-file-section.yaml",
}, },
{ {
name: "config file with base-path legacy option", name: "config file with base-path legacy option",
cfg: "test-fixtures/scan-configs/with-base-path.yaml", cfg: "testdata/scan-configs/with-base-path.yaml",
wantErr: assertErrorContains("source.base-path"), wantErr: assertErrorContains("source.base-path"),
}, },
} }

View File

@ -107,7 +107,7 @@ func fetchLatestApplicationVersion(id clio.Identification) (*hashiVersion.Versio
return nil, fmt.Errorf("HTTP %d on fetching latest version: %s", resp.StatusCode, resp.Status) return nil, fmt.Errorf("HTTP %d on fetching latest version: %s", resp.StatusCode, resp.Status)
} }
versionBytes, err := io.ReadAll(resp.Body) versionBytes, err := io.ReadAll(io.LimitReader(resp.Body, 500))
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to read latest version: %w", err) return nil, fmt.Errorf("failed to read latest version: %w", err)
} }

View File

@ -122,7 +122,7 @@ func formatVersionOptions(nameVersionPairs []string) string {
for _, name := range sortedAvailableFormats { for _, name := range sortedAvailableFormats {
s.WriteString("\n") s.WriteString("\n")
s.WriteString(fmt.Sprintf(" - %s", name)) fmt.Fprintf(&s, " - %s", name)
if len(availableVersions[name]) > 0 { if len(availableVersions[name]) > 0 {
s.WriteString(" @ ") s.WriteString(" @ ")

View File

@ -125,7 +125,7 @@ func TestPkgCoverageImage(t *testing.T) {
} }
func TestPkgCoverageDirectory(t *testing.T) { func TestPkgCoverageDirectory(t *testing.T) {
sbom, _ := catalogDirectory(t, "test-fixtures/image-pkg-coverage") sbom, _ := catalogDirectory(t, "testdata/image-pkg-coverage")
observedLanguages := strset.New() observedLanguages := strset.New()
definedLanguages := strset.New() definedLanguages := strset.New()
@ -261,7 +261,7 @@ func TestPkgCoverageImage_HasEvidence(t *testing.T) {
} }
func TestPkgCoverageDirectory_HasEvidence(t *testing.T) { func TestPkgCoverageDirectory_HasEvidence(t *testing.T) {
sbom, _ := catalogDirectory(t, "test-fixtures/image-pkg-coverage") sbom, _ := catalogDirectory(t, "testdata/image-pkg-coverage")
var cases []testCase var cases []testCase
cases = append(cases, commonTestCases...) cases = append(cases, commonTestCases...)

View File

@ -22,7 +22,7 @@ import (
func TestFileCataloging_Default(t *testing.T) { func TestFileCataloging_Default(t *testing.T) {
cfg := options.DefaultCatalog().ToSBOMConfig(clio.Identification{}) cfg := options.DefaultCatalog().ToSBOMConfig(clio.Identification{})
cfg = cfg.WithFilesConfig(filecataloging.DefaultConfig()) cfg = cfg.WithFilesConfig(filecataloging.DefaultConfig())
sbom, _ := catalogDirectoryWithConfig(t, "test-fixtures/files", cfg) sbom, _ := catalogDirectoryWithConfig(t, "testdata/files", cfg)
var metadata map[file.Coordinates]file.Metadata var metadata map[file.Coordinates]file.Metadata
@ -48,13 +48,13 @@ func TestFileCataloging_AllFiles(t *testing.T) {
SkipFilesAboveSize: 30, SkipFilesAboveSize: 30,
}, },
}) })
sbom, _ := catalogDirectoryWithConfig(t, "test-fixtures/files", cfg) sbom, _ := catalogDirectoryWithConfig(t, "testdata/files", cfg)
pwd, err := os.Getwd() pwd, err := os.Getwd()
require.NoError(t, err) require.NoError(t, err)
testPath := func(path string) string { testPath := func(path string) string {
return filepath.Join(pwd, "test-fixtures/files", path) return filepath.Join(pwd, "testdata/files", path)
} }
metadata := map[file.Coordinates]file.Metadata{ metadata := map[file.Coordinates]file.Metadata{

View File

@ -11,7 +11,7 @@ import (
) )
func TestNpmPackageLockDirectory(t *testing.T) { func TestNpmPackageLockDirectory(t *testing.T) {
sbom, _ := catalogDirectory(t, "test-fixtures/npm-lock") sbom, _ := catalogDirectory(t, "testdata/npm-lock")
foundPackages := strset.New() foundPackages := strset.New()
@ -32,7 +32,7 @@ func TestNpmPackageLockDirectory(t *testing.T) {
} }
func TestYarnPackageLockDirectory(t *testing.T) { func TestYarnPackageLockDirectory(t *testing.T) {
sbom, _ := catalogDirectory(t, "test-fixtures/yarn-lock") sbom, _ := catalogDirectory(t, "testdata/yarn-lock")
foundPackages := strset.New() foundPackages := strset.New()
// merge-objects and should-type are devDependencies in package.json and are excluded by default // merge-objects and should-type are devDependencies in package.json and are excluded by default

View File

@ -26,7 +26,7 @@ func TestBinaryElfRelationships(t *testing.T) {
} }
// run the test... // run the test...
sbom, _ := catalogFixtureImage(t, "elf-test-fixtures", source.SquashedScope) sbom, _ := catalogFixtureImage(t, "elf-testdata", source.SquashedScope)
// get a mapping of package names to their IDs // get a mapping of package names to their IDs
nameToId := map[string]artifact.ID{} nameToId := map[string]artifact.ID{}

View File

@ -278,7 +278,7 @@ func packageCatalogerExports(t *testing.T) map[string]exportTokenSet {
if info.IsDir() || if info.IsDir() ||
!strings.HasSuffix(info.Name(), ".go") || !strings.HasSuffix(info.Name(), ".go") ||
strings.HasSuffix(info.Name(), "_test.go") || strings.HasSuffix(info.Name(), "_test.go") ||
strings.Contains(path, "test-fixtures") || strings.Contains(path, "testdata") ||
strings.Contains(path, "internal") { strings.Contains(path, "internal") {
return nil return nil
} }

View File

@ -1 +0,0 @@
../../../../../../syft/pkg/cataloger/binary/test-fixtures/elf-test-fixtures

View File

@ -1 +0,0 @@
See the syft/cataloger/java/test-fixtures/java-builds dir to generate test fixtures and copy to here manually.

View File

@ -1,5 +1,5 @@
# we should strive to not commit blobs to the repo and strive to keep the build process of how blobs are acquired in-repo. # we should strive to not commit blobs to the repo and strive to keep the build process of how blobs are acquired in-repo.
# this blob is generated from syft/syft/catalogers/java/test-fixtures/java-builds , however, preserving the build process # this blob is generated from syft/syft/catalogers/java/testdata/java-builds , however, preserving the build process
# twice in the repo seems redundant (even via symlink). Given that the fixture is a few kilobytes in size, the build process is already # twice in the repo seems redundant (even via symlink). Given that the fixture is a few kilobytes in size, the build process is already
# captured, and integration tests should only be testing if jars can be discovered (not necessarily depth in java detection # captured, and integration tests should only be testing if jars can be discovered (not necessarily depth in java detection
# functionality), committing it seems like an acceptable exception. # functionality), committing it seems like an acceptable exception.

View File

@ -0,0 +1 @@
../../../../../../syft/pkg/cataloger/binary/testdata/elf-testdata

View File

@ -0,0 +1 @@
See the syft/cataloger/java/testdata/java-builds dir to generate test fixtures and copy to here manually.

Some files were not shown because too many files have changed in this diff Show More