Skip to content
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

Replace packages command with scan #2446

Merged
merged 4 commits into from
Jan 4, 2024
Merged

Conversation

wagoodman
Copy link
Contributor

@wagoodman wagoodman commented Dec 19, 2023

One of the original ideas for syft was to expand the scope of the tooling to generally answer the question "what are all of the things that are in my artifact" even for things that might not fit into an SBOM. This has sense been focused down to items that can be expressed in an SBOM (which is why the secrets cataloger was removed for instance). For the same reason, as described in #516 , the packages command no longer makes sense as a name (since we are always creating SBOMs from what we scan, instead of only showing packages or ). This PR addresses this by deprecating the current packages command in favor of scan (still aliasing to the root command).

So any current usage of the packages command command...

syft packages <input>

...should be migrated to scan:

syft scan <input>

A warning banner has been added to help users transition to the new command:

Screenshot 2023-12-19 at 11 13 00 AM

Closes #516 (generally follows the final suggestion in #516 (comment) )

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman changed the title Replace packages command with scan Replace packages command with scan Dec 19, 2023
@wagoodman wagoodman requested a review from a team December 19, 2023 16:14
@wagoodman wagoodman marked this pull request as ready for review December 19, 2023 16:17
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Copy link
Contributor

@willmurphyscode willmurphyscode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, an overall thing to double-check: Now configs change name as a result of this name? (I can't remember whether fangs/clio will generate configs that have the command name in the yaml keys or env var name.)

cmd/syft/cli/cli.go Outdated Show resolved Hide resolved
test/cli/scan_cmd_test.go Show resolved Hide resolved
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Copy link
Contributor

@kzantow kzantow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cmd/syft/cli/commands/scan.go Outdated Show resolved Hide resolved
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman enabled auto-merge (squash) January 4, 2024 16:47
@wagoodman wagoodman merged commit 4c20a74 into main Jan 4, 2024
10 checks passed
@wagoodman wagoodman deleted the deprecate-packages-command branch January 4, 2024 16:56
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* replace packages command with scan

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

* add tests for packages alias

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

* update comments with referenes to the packages command

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

* rename valiadte args function

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

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
sudo-bmitch added a commit to sudo-bmitch/regclient that referenced this pull request Mar 11, 2024
syft packages was replaced by syft scan in github.com/anchore/syft/pull/2446

Signed-off-by: Brandon Mitchell <git@bmitch.net>
Noxsios pushed a commit to zarf-dev/zarf that referenced this pull request Mar 22, 2024
## Description
`syft packages` was deprecated in favor of `syft scan` in `v0.100.0`

anchore/syft#2446
anchore/syft@v0.99.0...v0.100.0

<img width="1539" alt="deprecated"
src="https://github.com/defenseunicorns/zarf/assets/87675701/0bc6fa1f-8397-482e-bd7d-3e3987355b48">

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syft command restructure
3 participants