Commit graph

566 commits

Author SHA1 Message Date
Kyle Quest
99af1cae80 wolfictl apk extract-locked-configs CLI command
Signed-off-by: Kyle Quest <kcq.public@gmail.com>
2026-05-17 14:12:13 -07:00
Kyle Quest
bfc0a69b6c Enhanced version of the wolfictl CLI with additional commands, flags and bug fixes
Signed-off-by: Kyle Quest <kcq.public@gmail.com>
2026-05-09 16:20:25 -07:00
Jon Johnson
8b8a869568
dag: Allow multiple pipeline dirs (#1899)
We can pass multiple pipeline dirs for melange configs, so we should
accept multiple in dag.NewPackages.

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
2026-03-09 15:36:09 -07:00
Dimitri John Ledkov
af8a800aaa
Remove obsolete commands
These commands are now obsolete and new versions moved to cg.
2026-02-03 21:55:26 +01:00
Jon Johnson
c559967a28
lint: Handle multiple args
Now we can run:

```
wolfictl lint foo bar baz
```

This diff feels a little goofy but I didn't want to touch the actual
linter code, and this keeps the diff small and simple.

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
2026-01-12 13:53:41 -08:00
Sergio Durigan Junior
abbc201c7f bump.go: Ignore bot-generated CVE/GHSA comments
octo-sts will [add CVE/GHSA
comments](352a0137b9) whenever it
bumps a package's epoch to fix a security issue.  This is good, but we
should remove those comments when we invoke `wolfictl bump`, otherwise
they will wrongly imply that the manual bump was related to the
security fix as well.

I tried to be conservative here and only remove the comments that
start with "(CVE|GHSA)-", because there is a possibility to find an
actual human-made comment and we don't want to touch those (although
IMO it should be considered bad practice to leave manual comments
right after the `epoch` definition).

Signed-off-by: Sergio Durigan Junior <sergiodj@chainguard.dev>
2025-12-03 12:06:58 -05:00
James Page
a3ad72bd64 Rename option to packages-file 2025-08-11 12:21:41 +01:00
James Page
1f1aec20cb withdrawn-packages-file -> withdrawn-packages 2025-08-11 09:42:23 +01:00
James Page
f49bd73606 withdraw: add option to read from file
As part of the work to garbage collect older apk files we need to be
able to withdraw more packages that can be supported as command line
arguments from APK indexes; add option to pass the list of packages to
withdraw as a file to support larger withdrawal options.
2025-08-11 09:34:03 +01:00
Hector Fernandez
4d646d09ed
scan: make max db allowed build age configurable
Signed-off-by: Hector Fernandez <hector@chainguard.dev>
2025-07-14 19:07:03 +02:00
James Rawlings
d93a090527
feat: add deprecate notice to advisory commands in wolfictl
Add deprecation notices to all advisory commands to inform users that advisory management will move to a new internal system. Users are directed to public security feeds.

Add advisoryDeprecationMessage constant for consistent messaging
Mark all advisory commands as deprecated using Cobra's Deprecated field
Deprecation applies to: advisory, list, create, update, discover, db, validate, export, and migrate commands
The deprecation message directs users to:
7dd4cbf/docs/foundational_concepts.md (security-feeds)

Signed-off-by: James Rawlings <jrawlings@chainguard.dev>
2025-06-11 21:40:04 +01:00
Carlos Tadeu Panato Junior
ca6e9a0f19
Upgrade golangci to v2 (#1607)
* upgrade golangci-lint to v2*

* fix lints
2025-05-21 15:45:46 +02:00
Dan Luhring
b43e2868c0
chore(scan): add CGAID field to Finding struct
And deprecate the existing Advisory field, which was a pointer to the entire advisory record.

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-05-13 18:44:37 -04:00
Jon Johnson
a8979552d9
bump: Don't fail if there are comments
See https://github.com/wolfi-dev/os/pull/52024

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
2025-04-29 10:38:09 -07:00
Dan Luhring
67e9cf6d25
Merge pull request #1548 from mgreau/advisory-schema-dependency
adv: introduce the new advisory-schema module
2025-04-18 15:15:03 -04:00
Maxime Gréau
2a1b3da39d
fix import
Signed-off-by: Maxime Gréau <maxime.greau@chainguard.dev>
2025-04-18 15:05:04 -04:00
Maxime Gréau
1b6a737859
adv schema v0.37.1 with cga_id
Signed-off-by: Maxime Gréau <maxime.greau@chainguard.dev>
2025-04-18 09:48:56 -04:00
Jon Johnson
40f58de832
Bump apko, fix breaking change
Sorry.

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
2025-04-17 10:05:06 -07:00
Maxime Gréau
ce44806131
adv: introduce the new advisory-schema module
This commit introduces the new `advisory-schema` module which contains the
advisory schema and validation logic extracted from wolfictl.

It ensures a clear separation between the codebase that defines the schema
and the codebases that consumes it, such as this `wolfictl`
repository and others.

Note - the initial release version of `advisory-schema` (v0.37.0) is aligned with the
upcoming `wolfictl` release that first depends on this module, making the refactoring
history easier to trace. Each project will  follow its own release
schedule moving forward.

Signed-off-by: Maxime Gréau <maxime.greau@chainguard.dev>
2025-04-16 16:26:38 -04:00
Dan Luhring
412b1cf80b
refactor(scan): update filtering to use adv getter abstraction
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-11 09:18:41 -04:00
Dan Luhring
a0beac91a9
chore(scan)!: cleanup govulncheck triaging option
This functionality has not been tended to in a while, and is being replaced by other logic elsewhere.

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-10 19:12:28 -04:00
Dan Luhring
63492e7042
fix(scan): avoid panic by handling err from SBOM gen
Before we were only handling this for the outline output format. We dont want this to depend on the output format.

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-10 18:39:09 -04:00
Dan Luhring
0829c57481
feat(yam): export lib method for reading and parsing yam config
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-10 09:43:59 -04:00
Dan Luhring
fce17bcc4b
fix(adv): panic on advisory prompt
This happened when sourcing potential fixed versions from local melange configs, when there was no melange config matching the package specified by the user. The code previously assumed there would be at least one entry, which was error-prone. The code has been updated to use the First() method on the configs index object.

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-09 10:43:55 -04:00
Dan Luhring
05b84d4c5f
update func name per review feedback
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-02 18:49:45 -04:00
Dan Luhring
4341b80b20
feat(adv): skip redundant adv updates for bulk operations
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-02 18:23:17 -04:00
Dan Luhring
ee2f2736f9
refactor(adv): use Putter for create and update commands
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-04-01 18:21:54 -04:00
Dan Luhring
7de88b1aa5
address feedback from Copilot
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-03-28 16:45:04 -04:00
Dan Luhring
2d92cc6f90
feat(adv): bulk create and update of adv data
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-03-27 20:28:01 -04:00
Trevor Dunlap
4c61ffde42
Merge pull request #1507 from wolfi-dev/dependabot/go_modules/github.com/anchore/grype-0.90.0
build(deps): bump github.com/anchore/grype from 0.89.0 to 0.90.0
2025-03-27 10:02:44 -04:00
Dan Luhring
376f39539c
feat!(scan): introduce normalized data source type
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-03-26 16:37:51 -04:00
Dan Luhring
56934a339f
feat(adv): introduce abstractions and implement
- Update list command to use advisory Getter
- Implement lazy getter using fs.FS and document decoding

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-03-25 19:37:57 -04:00
Dan Luhring
60ffcdba75
feat(adv): rebase
A new CLI command and library operation that copies select advisory data for a given package from its instance in one directory to that in another directory.

This also significantly improves the testerfs implementation and its use in build configs tests.

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-02-09 17:17:19 -05:00
Dan Luhring
b65d50f061
fix(logging): set default level to warn
Logging for at least some commands used to default to WARN level. We recently cleaned up logging, but according to git bisect, commit d2196cdc06 has commands like "scan" logging at INFO by default, which is noisier than intended for the commands. This change sets the default logging level to WARN while preserving the ability to set it to INFO or higher if desired.

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2025-01-25 15:18:39 -05:00
Jason Hall
d2196cdc06
Merge pull request #1417 from imjasonh/cleanup-log
cleanup charm log indirection
2025-01-24 10:48:54 -05:00
Jason Hall
622902e692
cleanup charm log indirection
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-01-24 10:40:49 -05:00
Jason Hall
48ad4271bc
remove --verbosity flag in favor of --log-level
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-01-24 09:56:07 -05:00
Jason Hall
29bc75e9d0
fix wolfictl text check
Signed-off-by: Jason Hall <jason@chainguard.dev>
2024-12-10 14:57:21 -05:00
Jason Hall
910c9c75cc
fix make docs
Signed-off-by: Jason Hall <jason@chainguard.dev>
2024-12-10 08:51:46 -05:00
Dan Luhring
17c544ccfc
Merge pull request #1348 from luhring/adv-ls-json
feat(adv): add `-o json` option to `adv ls` command
2024-12-02 10:33:53 -05:00
Dan Luhring
5cae2785cc
feat(adv): option for json output in ls command
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-12-02 10:23:21 -05:00
Dan Luhring
9143b72611
refactor(adv): renames for clarity
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-12-02 09:35:35 -05:00
Dan Luhring
c73fe0d6e8
fix(text): add context to dag construction error messages
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-12-01 10:28:06 -05:00
kranurag7
112108c5b5 print full package version with image apk subcommand
Signed-off-by: kranurag7 <81210977+kranurag7@users.noreply.github.com>
2024-11-29 09:24:48 +05:30
Dan Luhring
0232dd693d
refactor(scan): use central styles for rendering
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-11-21 18:04:03 -05:00
Dan Luhring
14757f09e4
refactor(sbom): use central tree component for rendering
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-11-21 18:02:50 -05:00
Dan Luhring
ed7b43372d
fix(scan): panic when no adv doc exists for package
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-11-21 15:42:15 -05:00
Dan Luhring
71c53c7ef3
chore(scan): cleanup CLI and rendering code
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-11-21 15:09:03 -05:00
Dan Luhring
9396ef00cb
feat(scan): colors that are legible with light background
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-11-20 20:03:50 -05:00
Dan Luhring
5bab9c97fa
feat(scan): show context from advisory data
For each finding, if user has provided advisory data, show the latest status from the applicable advisory.

Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
2024-11-20 18:51:20 -05:00