-
Notifications
You must be signed in to change notification settings - Fork 138
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
Send the scanned repository's origin url as an extra header #747
Send the scanned repository's origin url as an extra header #747
Conversation
@sylvain-baud-gg IMO sending the entire URL is better, as GIM can then extract the required information from it (repo name, type of repo...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only see a change on the scan diff . I think the iac_scan_all should also fetch the remote url and send it.
Some edge case to keep in mind :
- Local repo only --> We want to send None
- Case of repo containing sub repos. --> We want to send the repo linked to the path provided.
- Launching the command inside a repoA to scan a repoB --> We want to send repoB
29ee9e3
to
71f8c8a
Compare
71f8c8a
to
d133243
Compare
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #747 +/- ##
==========================================
+ Coverage 91.68% 91.86% +0.18%
==========================================
Files 154 154
Lines 6348 6380 +32
==========================================
+ Hits 5820 5861 +41
+ Misses 528 519 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
a51d836
to
006853a
Compare
I suggest you review commits one by one |
c681d44
to
8ae0002
Compare
@agateau-gg thank you for your review on my other PR, this one became our priority for the next days. Can you check it please? As said above, it is easier commit by commit imo |
b911e99
to
a536937
Compare
1d23ca0
to
cc0e04c
Compare
5c07b61
to
e96bb79
Compare
2dc67a6
to
785275b
Compare
144a86f
to
c99790a
Compare
…ory url as header
c99790a
to
f2ad1be
Compare
Compute the repository remote url. Pick one at random if several are found. This will allow a better connection between ggshield and GIM's database.
This will appear in the request headers:
'GGShield-Repository-URL': 'https://github.com/bridgecrewio/terragoat.git'
All verticals will send this header. For IAC/SCA, the repository found is based on the provided path in the command.
For Secrets:
archive
,docker
,docker-archive
,docset
,pypi
.ci
,pre-commit
,pre-push
,pre-receive
,range
. This is the directory that is checked bycheck_git_dir
.path
subcommand, if thepaths
argument has exactly one element, it is sent. Otherwise cwd is sent.repo
subcommand, therepository
argument or the local clone path is sent, depending on the type of the provided argument.