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

🌱 Restrict egress on github actions #1733

Merged
merged 3 commits into from
Mar 21, 2022

Conversation

naveensrinivasan
Copy link
Member

What kind of change does this PR introduce?

(Is it a bug fix, feature, docs update, something else?)

What is the current behavior?

What is the new behavior (if this is a feature change)?**

Restrict egress for github actions

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

NONE

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)


Restrict egress for GitHub actions

@naveensrinivasan naveensrinivasan temporarily deployed to integration-test March 15, 2022 17:41 Inactive
@github-actions
Copy link

Integration tests success for
[bf3317c]
(https://github.com/ossf/scorecard/actions/runs/1988334763)

@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #1733 (887de3c) into main (0c76ae3) will increase coverage by 3.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1733      +/-   ##
==========================================
+ Coverage   56.71%   59.79%   +3.07%     
==========================================
  Files          65       65              
  Lines        6377     6377              
==========================================
+ Hits         3617     3813     +196     
+ Misses       2519     2317     -202     
- Partials      241      247       +6     

@naveensrinivasan naveensrinivasan force-pushed the naveen/feat/restrict-egress-github-actions branch from bf3317c to 64808c6 Compare March 16, 2022 22:51
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test March 16, 2022 22:51 Inactive
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test March 16, 2022 22:53 Inactive
@github-actions
Copy link

Integration tests success for
[64808c6]
(https://github.com/ossf/scorecard/actions/runs/1995537440)

@github-actions
Copy link

Integration tests success for
[87650c0]
(https://github.com/ossf/scorecard/actions/runs/1995538651)

@naveensrinivasan naveensrinivasan force-pushed the naveen/feat/restrict-egress-github-actions branch from 87650c0 to 55977d2 Compare March 16, 2022 23:06
@naveensrinivasan naveensrinivasan enabled auto-merge (rebase) March 16, 2022 23:07
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test March 16, 2022 23:10 Inactive
@github-actions
Copy link

Integration tests success for
[55977d2]
(https://github.com/ossf/scorecard/actions/runs/1995590994)

@github-actions
Copy link

Integration tests success for
[f753239]
(https://github.com/ossf/scorecard/actions/runs/1995592092)

@naveensrinivasan naveensrinivasan force-pushed the naveen/feat/restrict-egress-github-actions branch from f753239 to 7eccbd9 Compare March 21, 2022 13:25
@naveensrinivasan naveensrinivasan temporarily deployed to integration-test March 21, 2022 13:26 Inactive
@github-actions
Copy link

Integration tests success for
[7eccbd9]
(https://github.com/ossf/scorecard/actions/runs/2016352268)

@naveensrinivasan naveensrinivasan temporarily deployed to integration-test March 21, 2022 13:32 Inactive
@github-actions
Copy link

Integration tests success for
[d953c17]
(https://github.com/ossf/scorecard/actions/runs/2016384444)

@naveensrinivasan naveensrinivasan temporarily deployed to integration-test March 21, 2022 13:37 Inactive
@github-actions
Copy link

Integration tests success for
[887de3c]
(https://github.com/ossf/scorecard/actions/runs/2016419116)

@naveensrinivasan naveensrinivasan merged commit 1c61acd into main Mar 21, 2022
@naveensrinivasan naveensrinivasan deleted the naveen/feat/restrict-egress-github-actions branch March 21, 2022 14:00
@varunsh-coder
Copy link
Contributor

@naveensrinivasan wanted to share this finding. harden-runner monitors file writes and detects if source code has been overwritten. I was looking at the output for scorecard workflows and saw this (screenshot for annotation from the generate-mocks job) https://github.com/ossf/scorecard/actions/runs/2018689479. I think it is a false positive, but wanted to share it, as it is cool to see detection of source code being overwritten :).

Screen Shot 2022-03-21 at 3 40 57 PM

@laurentsimon
Copy link
Contributor

we do use a library called mockgen to generate mock implementation, it may not be a false positive! (idk how the library works under the hood)

@varunsh-coder
Copy link
Contributor

we do use a library called mockgen to generate mock implementation, it may not be a false positive! (idk how the library works under the hood)

There is a call to mockgen. The destination file clients/mockclients/vulnerabilities.go is being overwritten. The file is already in the repo, so it gets written first during checkout. Then the call to mockgen overwrites it. That is causing the overwrite warning...

mockgen -source=clients/vulnerabilities.go -destination=clients/mockclients/vulnerabilities.go -package=mockrepo -copyright_file=clients/mockclients/license.txt

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