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>
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>
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>
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.
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>
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>
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>
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>
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>
- Update list command to use advisory Getter
- Implement lazy getter using fs.FS and document decoding
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
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>
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>
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>