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

docs: add --file-patterns definition format to the error message #4654

Merged
merged 1 commit into from
Jun 20, 2023
Merged

docs: add --file-patterns definition format to the error message #4654

merged 1 commit into from
Jun 20, 2023

Conversation

MFTabriz
Copy link
Contributor

@MFTabriz MFTabriz commented Jun 16, 2023

Currently, the information for running trivy config --file-patterns xxx is documented in the source code as a comment, and in Skipping Files and Directories page in the documentation [not a place one would normally look for learning about including files!]. But it has not been documented in the Misconfiguration Scanning page, its error message, or output of trivy config --help.

New error message:

> trivy config --file-patterns='bad_format*' ~/my_path

INFO	Misconfiguration scanning is enabled
FATAL	filesystem scan error: scan error: unable to initialize a scanner: unable to initialize a filesystem scanner: analyzer group error: invalid file pattern (bad_format*) expected format: "fileType:regexPattern" e.g. "dockerfile:my_dockerfile_*"

Checklist

@CLAassistant
Copy link

CLAassistant commented Jun 16, 2023

CLA assistant check
All committers have signed the CLA.

@MFTabriz MFTabriz changed the title docs: add expected filepattern definition format to the error message docs: add --file-patterns definition format to the error message Jun 16, 2023
@MFTabriz MFTabriz marked this pull request as ready for review June 17, 2023 01:06
@MFTabriz MFTabriz requested a review from knqyf263 as a code owner June 17, 2023 01:06
@knqyf263
Copy link
Collaborator

knqyf263 commented Jun 19, 2023

Thanks for your contribution. Could you merge the main branch?

@MFTabriz
Copy link
Contributor Author

@knqyf263 I rebased it!

@simar7 simar7 self-requested a review June 19, 2023 22:37
Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

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

thanks lgtm!

@knqyf263 knqyf263 enabled auto-merge June 20, 2023 14:02
@knqyf263 knqyf263 added this pull request to the merge queue Jun 20, 2023
Merged via the queue into aquasecurity:main with commit 7d48c5d Jun 20, 2023
AnaisUrlichs pushed a commit to AnaisUrlichs/trivy that referenced this pull request Aug 10, 2023
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.

4 participants