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

Add policy set for GitHub provider #334

Merged
merged 5 commits into from
Sep 18, 2020
Merged

Conversation

HorizonNet
Copy link
Contributor

Add GitHub as a new provider with the existing policy copied over from
the gcp policies.

Resolves #325

Add GitHub as a new provider with the existing policy copied over from
the gcp policies.

Resolves #325
@HorizonNet
Copy link
Contributor Author

Tested locally via bin/terrascan scan -t github -p pkg/policies/opa/rego/github -f repositories.tf. Violations are shown as expected. Missing point is that violations from the original gcp policy is also reported when running bin/terrascan scan -t github -p pkg/policies/ -f repositories.tf.

@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #334 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
+ Coverage   61.42%   61.45%   +0.03%     
==========================================
  Files          56       57       +1     
  Lines        1068     1069       +1     
==========================================
+ Hits          656      657       +1     
  Misses        346      346              
  Partials       66       66              
Impacted Files Coverage Δ
pkg/cli/scan.go 64.28% <ø> (ø)
pkg/policy/github.go 100.00% <100.00%> (ø)

@HorizonNet
Copy link
Contributor Author

@williepaul Thanks for the feedback. Addressed your points. Let me make this one ready for review as you already gave feedback.

@HorizonNet HorizonNet marked this pull request as ready for review September 18, 2020 07:25
@sonarcloud
Copy link

sonarcloud bot commented Sep 18, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@williepaul williepaul left a comment

Choose a reason for hiding this comment

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

@HorizonNet all looks good, I tested the changes out locally and they worked fine. We really appreciate the contribution!

@williepaul williepaul merged commit 424c823 into tenable:master Sep 18, 2020
@HorizonNet HorizonNet deleted the issue-325 branch September 19, 2020 19:58
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.

Rule for github_repository seems to be wrongly placed under gcp
2 participants