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

Remove ref for internal action calls #1075

Merged
merged 7 commits into from
Oct 19, 2022

Conversation

laurentsimon
Copy link
Collaborator

Remove the ref we use to call internal actions, Instead, checkout the builder repo and calls them locally.

closes #880

@laurentsimon laurentsimon changed the title Remove ref for actions and checkout the builder repo instead Remove ref for internal action calls Oct 18, 2022
@laurentsimon
Copy link
Collaborator Author

@ianlewis appreciate feedback and questions, since this seems to undo some of the secure-checkout code. I want to be sure I'm not mis-understanding something.

Copy link
Collaborator

@asraa asraa left a comment

Choose a reason for hiding this comment

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

lgtm, after I understand now the user risk and interaction here.

.github/actions/secure-builder-checkout/action.yaml Outdated Show resolved Hide resolved
.github/actions/secure-project-checkout/action.yaml Outdated Show resolved Hide resolved
.github/actions/secure-project-checkout/action.yaml Outdated Show resolved Hide resolved
if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
github_sha="$PULL_REQUEST_SHA"
fi

Copy link
Member

Choose a reason for hiding this comment

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

@laurentsimon Since you mentioned actions/checkout pulls a tar, I wondered if that tar could somehow be overwritten with a dirty checkout such that git log -1 --format='%H' returns the right SHA but the checkout itself it dirty and contains different code.

Maybe not necessary for this PR but we could maybe add a check for git status or git diff in the future.

@ianlewis
Copy link
Member

@ianlewis appreciate feedback and questions, since this seems to undo some of the secure-checkout code. I want to be sure I'm not mis-understanding something.

I think this is fine. I wasn't totally confident secure-checkout was solving the issue properly anyway.

@ianlewis
Copy link
Member

ianlewis commented Oct 19, 2022

Related #626

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.

[feature] Improve code readability
3 participants