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

adds support to configure dashboard mode in k8s validating webhook #683

Merged

Conversation

patilpankaj212
Copy link
Contributor

@patilpankaj212 patilpankaj212 commented Apr 22, 2021

A new attribute dashboard is introduced for k8s-admission-control in the terrascan config file.
When dashboard is true, violations and admission review response would be logged to db, otherwise, the violations would be logged to the console.

@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #683 (91156a6) into master (6929cb2) will decrease coverage by 1.28%.
The diff coverage is 52.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #683      +/-   ##
==========================================
- Coverage   74.56%   73.28%   -1.29%     
==========================================
  Files         110      110              
  Lines        3082     3099      +17     
==========================================
- Hits         2298     2271      -27     
- Misses        609      650      +41     
- Partials      175      178       +3     
Impacted Files Coverage Δ
pkg/http-server/webhook-scan-logs.go 0.00% <0.00%> (ø)
pkg/results/types.go 100.00% <ø> (ø)
pkg/runtime/executor.go 86.15% <ø> (-0.21%) ⬇️
pkg/http-server/file-scan.go 81.00% <50.00%> (ø)
pkg/k8s/admission-webhook/validating-webhook.go 62.00% <60.71%> (-18.44%) ⬇️
pkg/cli/run.go 91.42% <100.00%> (ø)
pkg/http-server/remote-repo.go 69.64% <100.00%> (ø)
pkg/k8s/dblogs/webhook-scan-logger.go 70.90% <0.00%> (-7.28%) ⬇️

@patilpankaj212 patilpankaj212 changed the title adds support of blind mode for k8s validating webhook adds support to configure dashboard mode in k8s validating webhook Apr 23, 2021
warnings: false,
allowed: true,
wantStatus: http.StatusOK,
},
{
name: "risky request object with config that just removes some of the violations",
contentRequestPath: "./k8s_testdata/risky_testconfig.json",
contentRequestPath: filepath.Join(k8sTestData, "risky_testconfig.json"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for improving the tests!

@sonarcloud
Copy link

sonarcloud bot commented Apr 23, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kanchwala-yusuf kanchwala-yusuf merged commit 6604c23 into tenable:master Apr 23, 2021
devang-gaur pushed a commit to devang-gaur/terrascan that referenced this pull request May 5, 2021
…lt (tenable#683)

* config file not required for executor

* test changes for blind mode

* dashboard mode is not default

* incorporate review changes
@patilpankaj212 patilpankaj212 deleted the admn-webhook-blind-mode branch May 5, 2022 11:36
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.

2 participants