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

bug: config file generated by --generate-default-config contains removed and deprecated flags #8043

Closed
DmitriyLewen opened this issue Dec 4, 2024 Discussed in #8035 · 0 comments · Fixed by #8046
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@DmitriyLewen
Copy link
Contributor

Description

Trivy includes all flags into config file when using --generate-default-config command.
But Trivy returns error for this config file:

➜ trivy image   
2024-12-03T12:44:48-07:00       INFO    Loaded  file_path="trivy.yaml"
2024-12-03T12:44:48-07:00       ERROR   "--reset" was removed. Use "trivy clean --all" instead.
2024-12-03T12:44:48-07:00       FATAL   Fatal error     flag error: db flag error: unable to parse flag: removed flag ("--reset")

We need to exclude removed and obsolete flags from the generated configuration file.

Discussed in #8035

@DmitriyLewen DmitriyLewen added the kind/bug Categorizes issue or PR as related to a bug. label Dec 4, 2024
@DmitriyLewen DmitriyLewen self-assigned this Dec 4, 2024
@DmitriyLewen DmitriyLewen modified the milestones: v0.58.1, v0.59.0 Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant