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

🐛 show error when unauthenticated #671

Merged
merged 2 commits into from
Aug 1, 2023
Merged

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Aug 1, 2023

'cnspec vuln' now shows an error when an unathenticated request is made.

Fixes #629

'cnspec vuln' now shows an error when an unathenticated request is made.

Fixes #629

Signed-off-by: Christian Zunker <christian@mondoo.com>
@czunker
Copy link
Contributor Author

czunker commented Aug 1, 2023

Before this PR, we already handled the case for an empty config:

cnspec vuln container image photon:4.0-20221224 --config /dev/null                                                                                                            
→ loaded configuration from /dev/null using source --config
FTL vulnerability scan requires authentication, future versions will not have this restriction, login with `cnspec login --token`

This PR shows the same error when using the wrong config:

cnspec vuln container image photon:4.0-20221224 --config /tmp/sa-defect.json                                                                                                           
→ loaded configuration from /tmp/sa-defect.json using source --config
→ using service account credentials
→ discover related assets for 1 asset(s)
→ resolved assets resolved-assets=1
FTL vulnerability scan requires authentication, future versions will not have this restriction, login with `cnspec login --token`

Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @czunker

@chris-rock chris-rock merged commit 39029b2 into main Aug 1, 2023
7 checks passed
@chris-rock chris-rock deleted the christian/vuln_auth branch August 1, 2023 07:37
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cnspec vuln does not return unauthenticated when using wrong credentials
2 participants