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

fix - terrascan not able to read modules within a subdirectory #641

Merged

Conversation

patilpankaj212
Copy link
Contributor

modified the logic to get module path for local source.

tested with:

  1. source = "git::https://github.com/terraform-aws-modules/terraform-aws-security-group//modules/http-80?ref=v3.18.0"
  2. source = "terraform-aws-modules/security-group/aws//modules/http-80"

@patilpankaj212 patilpankaj212 linked an issue Apr 6, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #641 (faa58aa) into master (dfc0d08) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #641      +/-   ##
==========================================
- Coverage   78.09%   77.99%   -0.10%     
==========================================
  Files         104      104              
  Lines        2597     2586      -11     
==========================================
- Hits         2028     2017      -11     
  Misses        422      422              
  Partials      147      147              
Impacted Files Coverage Δ
pkg/iac-providers/terraform/commons/load-dir.go 83.07% <100.00%> (-2.45%) ⬇️

@devang-gaur
Copy link
Contributor

fixes #600

devang-gaur
devang-gaur previously approved these changes Apr 6, 2021
kanchwala-yusuf
kanchwala-yusuf previously approved these changes Apr 7, 2021
@kanchwala-yusuf
Copy link
Contributor

@patilpankaj212 , Would it make sense to add a test in our e2e suite? This would make sure that we do not hit a regression in this critical code path

-e2e test with remote url with subdirectory
@sonarcloud
Copy link

sonarcloud bot commented Apr 7, 2021

Kudos, SonarCloud Quality Gate passed!

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kanchwala-yusuf kanchwala-yusuf merged commit 258206b into tenable:master Apr 8, 2021
@patilpankaj212 patilpankaj212 deleted the fix-remote-with-subdir 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.

Terrascan not able to read modules within a subdirectory
3 participants