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 support for repo-url and branch name in CLI flags and scan output #1059

Merged
merged 2 commits into from
Oct 21, 2021

Conversation

nasir-rabbani
Copy link
Contributor

these changes enable terrascan to accept the url of repository being scanned and reflects the url in the scan summary.

@codecov
Copy link

codecov bot commented Oct 13, 2021

Codecov Report

Merging #1059 (ce318db) into master (0719c9c) will increase coverage by 0.05%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1059      +/-   ##
==========================================
+ Coverage   78.56%   78.62%   +0.05%     
==========================================
  Files         238      238              
  Lines        6476     6494      +18     
==========================================
+ Hits         5088     5106      +18     
  Misses       1075     1075              
  Partials      313      313              
Impacted Files Coverage Δ
pkg/http-server/webhook-scan-logs.go 0.00% <0.00%> (ø)
pkg/results/types.go 100.00% <ø> (ø)
pkg/http-server/file-scan.go 83.03% <50.00%> (ø)
pkg/k8s/admission-webhook/validating-webhook.go 83.89% <75.00%> (+0.21%) ⬆️
pkg/cli/run.go 87.95% <100.00%> (+0.29%) ⬆️
pkg/cli/scan.go 75.00% <100.00%> (+1.66%) ⬆️
pkg/http-server/remote-repo.go 71.01% <100.00%> (ø)
pkg/http-server/webhook-scan.go 73.91% <100.00%> (+1.18%) ⬆️
pkg/runtime/executor.go 91.13% <100.00%> (+0.28%) ⬆️
pkg/writer/human_readable.go 84.14% <100.00%> (+0.81%) ⬆️
... and 1 more

Copy link
Contributor

@kanchwala-yusuf kanchwala-yusuf left a comment

Choose a reason for hiding this comment

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

Please add some unit, e2e and integration tests (whatever applicable)

@@ -108,6 +108,9 @@ type ScanOptions struct {

// notificationWebhookToken is the auth token to call the notification webhook URL
notificationWebhookToken string

// repoURL lets us specify URL of the repository being scanned (targetted for pipeline scanning)
repoURL string
Copy link
Contributor

Choose a reason for hiding this comment

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

Please evaluate how the branch information can be captured along with repo url

@kanchwala-yusuf
Copy link
Contributor

@cesar-rodriguez , should we also capture branch info to uniquely identify the repository branch?

@cesar-rodriguez
Copy link
Contributor

@cesar-rodriguez , should we also capture branch info to uniquely identify the repository branch?

Yes

@nasir-rabbani nasir-rabbani force-pushed the repo-url-arg branch 2 times, most recently from 57c59ec to 776a1ab Compare October 19, 2021 19:01
@cesar-rodriguez cesar-rodriguez changed the title add repo-url arg Add support for repo-url and branch name in CLI flags and scan output Oct 21, 2021
@sonarcloud
Copy link

sonarcloud bot commented Oct 21, 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

@kanchwala-yusuf kanchwala-yusuf merged commit 474f1b6 into tenable:master Oct 21, 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.

3 participants