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

chore: adding custom gitguardian check #2313

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

ruzell22
Copy link
Contributor

related to #720

this includes gitguardian workflow + configuration file

@ruzell22
Copy link
Contributor Author

Gitguardian scan is not getting triggered when changed to pull_request_target from the original pull_request. Currently figuring out how to make the workflow triggered.

@ruzell22 ruzell22 force-pushed the customgitguardian branch from 3be69e8 to ede5c6b Compare March 13, 2023 03:21
Copy link
Contributor

@jagpreetsinghsasan jagpreetsinghsasan left a comment

Choose a reason for hiding this comment

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

LGTM

@ruzell22
Copy link
Contributor Author

By default, the environmental secrets is not being accessed by this pull request because it is from a fork repository. However, I have tested it with an exposed test token in replacement with the secrets.GITGUARDIAN_API_KEY and the scanner worked successfully (screenshots are sent to @petermetz privately).

After the PR is merged, it is expected to have access with the environmental secrets and the scanner will run successfully.

The test codes used in testing were all deleted to prevent further usage of it. The PR for the clean up of #720 will be made after this PR is merged.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@ruzell22 Please change the following things:

  1. Squash the commits into a single one with an interactive git rebase
  2. Make sure to explain in the commit message body why this was necessary when we have a stock git guardian workflow action on the GitHub marketplace (because that one was not possible to be configured for exclusions if I remember correctly)
  3. Also clarify what was your solution to the problem you outlined in your comment above [1]

[1]:

Gitguardian scan is not getting triggered when changed to pull_request_target from the original pull_request. Currently figuring out how to make the workflow triggered.

@ruzell22 ruzell22 force-pushed the customgitguardian branch from ede5c6b to e88ce7d Compare March 30, 2023 04:32
@ruzell22
Copy link
Contributor Author

Hello @petermetz , commit is now squashed into one and the commit message is also changed. Thank you.

@ruzell22 ruzell22 requested review from petermetz and removed request for VRamakrishna, sandeepnRES and izuru0 March 30, 2023 04:36
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

Great, thank you @ruzell22 LGTM

related to hyperledger-cacti#720

This includes gitguardian workflow + configuration file

This change was necessary even if we have stock git guardian workflow
action because it was not possible to be configured for exclusions.

The scanner was not getting triggered by pull_request_target as
expected to access the secrets environment variable so it was
returned to the original pull_request. By default, secrets is not
possible to be accessed by a pull request from a fork repository
unless it is merged to the main repository. Hence, the original
pull_request will work after merging.

The test tokens used in testing were all deleted to prevent further
usage of it.

Signed-off-by: ruzell22 <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
@petermetz petermetz force-pushed the customgitguardian branch from e88ce7d to bdd8372 Compare April 3, 2023 02:51
@petermetz petermetz merged commit bdd8372 into hyperledger-cacti:main Apr 3, 2023
@petermetz petermetz deleted the customgitguardian branch April 3, 2023 17:03
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 7, 2023
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 13, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 27, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 27, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 27, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
ruzell22 added a commit to ruzell22/cactus that referenced this pull request Apr 27, 2023
…#2379

fixes: hyperledger-cacti#2379

related to: hyperledger-cacti#2313 and hyperledger-cacti#1996

This fixes the Invalid token header, no credentials provided error
of the custom gitguardian workflow.

Signed-off-by: ruzell22 <[email protected]>
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.

4 participants