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

added binary based support for kustomize v2 and v3 #988

Merged
merged 11 commits into from
Aug 22, 2021

Conversation

nasir-rabbani
Copy link
Contributor

  • added kutomize binary based support for kustomize v2 and v3.

@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #988 (11dba7d) into master (01184ad) will decrease coverage by 0.24%.
The diff coverage is 59.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #988      +/-   ##
==========================================
- Coverage   78.46%   78.21%   -0.25%     
==========================================
  Files         231      237       +6     
  Lines        6255     6289      +34     
==========================================
+ Hits         4908     4919      +11     
- Misses       1045     1067      +22     
- Partials      302      303       +1     
Impacted Files Coverage Δ
pkg/iac-providers/kustomize/v2/load-dir.go 0.00% <0.00%> (ø)
pkg/iac-providers/kustomize/v2/load-file.go 0.00% <0.00%> (ø)
pkg/iac-providers/kustomize/v3/load-dir.go 0.00% <0.00%> (ø)
pkg/iac-providers/kustomize/v3/load-file.go 0.00% <0.00%> (ø)
pkg/iac-providers/kustomize/v4/load-file.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/policy/kustomize.go 100.00% <ø> (ø)
pkg/iac-providers/kustomize/commons/load-dir.go 58.22% <58.22%> (ø)
pkg/iac-providers/kustomize.go 100.00% <100.00%> (ø)
pkg/iac-providers/kustomize/commons/load-file.go 100.00% <100.00%> (ø)
pkg/iac-providers/kustomize/commons/types.go 100.00% <100.00%> (ø)
... and 9 more

@nasir-rabbani nasir-rabbani marked this pull request as ready for review August 16, 2021 12:45
pkg/iac-providers/kustomize/v4/load-file.go Outdated Show resolved Hide resolved
pkg/iac-providers/kustomize/v3/load-file.go Outdated Show resolved Hide resolved
pkg/iac-providers/kustomize/commons/types.go Outdated Show resolved Hide resolved
)

// KustomizeDirectoryLoader implements kustomize directory/file loading
type KustomizeDirectoryLoader struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

if this struct implements both directory and file loading should the type be KustomizeLoader?

pkg/iac-providers/kustomize/commons/load-file_test.go Outdated Show resolved Hide resolved
pkg/iac-providers/kustomize/commons/load-file.go Outdated Show resolved Hide resolved
)

var (
errLoadIacFileNotSupported = fmt.Errorf("load iac file is not supported for kustomize")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this error can be exported and used in other packages as well !!

patilpankaj212
patilpankaj212 previously approved these changes Aug 17, 2021
patilpankaj212
patilpankaj212 previously approved these changes Aug 19, 2021
patilpankaj212
patilpankaj212 previously approved these changes Aug 20, 2021
nasir-rabbani and others added 4 commits August 20, 2021 12:23
* extract container images from tf iac files

* increase kubernetes resource scan coverage

* using constants for common strings

* adds: extract image ref from tf file

* code nits: added comments and removed unwanted variables

* adds: extracting containers from aws and azure resources

* code nits: added new method for jsoncode type

Co-authored-by: Suvarna Rokade <suvarnarokade11@gmail.com>
* inital support for image vulnerability scanning

* adds: flag for vul scanning and human readable output support

* Adds: unit test cases and code refactoring

* made vulnerability methods mockable

* adds: documentation for vulnerability scanning

* adds: support google artifact registry

* updates docs

* updates flag message

* fixes: tf file image extraction and e2e test

Co-authored-by: Cesar Rodriguez <cesar@accurics.com>
Copy link
Contributor

@cesar-rodriguez cesar-rodriguez left a comment

Choose a reason for hiding this comment

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

Would you mind rebasing with master?

@sonarcloud
Copy link

sonarcloud bot commented Aug 22, 2021

Kudos, SonarCloud Quality Gate passed!    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

@cesar-rodriguez cesar-rodriguez merged commit a559f4b into tenable:master Aug 22, 2021
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.

5 participants