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

🐛 Issues with the --use-recording switch and cnspec mock #1297

Open
mm-weber opened this issue May 18, 2024 · 0 comments
Open

🐛 Issues with the --use-recording switch and cnspec mock #1297

mm-weber opened this issue May 18, 2024 · 0 comments

Comments

@mm-weber
Copy link
Contributor

1) the --use-recording switch depends on live provider authentication

cnspec scan k8s   -f ~/projects/cnspec-enterprise-policies/policies/amazon-eks.mql.yaml --discover clusters   --use-recording ~/projects/cnspec-enterprise-policies/certifications/eks-1.4.0/pass-k8s.json

using the online k8s provider with the --use-recording switch will work sort-of, but only with an online asset, which can be the wrong one.

Running against this EKS PASS recording when kubctl is actually talking to an AKS cluster, will lead to the correct results, but with the wrong asset

2) the --use-recording switch running against a recording that would need the --sudo switch it will fail the checks that count on it

cnspec scan mock   -f ~/projects/cnspec-enterprise-policies/policies/azure-aks.mql.yaml   --use-recording ~/projects/cnspec-enterprise-policies/certifications/aks-1.5.0/pass-node.json -o full

Desired behaviour.

  • Be able to use cnspec scan mock and --use-recording as a replacement for any other provider, e.g. cnspec scan k8s and --use-recording
  • Be able to cnspec scan mock and --use-recording without depending on a live connection to a previously scanned asset cnspec scan --record when scanning a .json file.
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

No branches or pull requests

2 participants