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

CI Notify on failure #453

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

CI Notify on failure #453

wants to merge 7 commits into from

Conversation

csgui
Copy link
Collaborator

@csgui csgui commented Jul 29, 2024

Add a job to notify @stacks-network/clarity-wasm team when property testing has failed.

We can also have a Slack integration as a compliment to the automated issue. To be handled in other PR, if the case.

Issue generated as a test: #455

wileyj
wileyj previously approved these changes Jul 29, 2024
Copy link

@wileyj wileyj left a comment

Choose a reason for hiding this comment

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

lgtm

@csgui csgui requested a review from obycode July 30, 2024 16:13
Copy link
Collaborator

@obycode obycode left a comment

Choose a reason for hiding this comment

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

Looks good to me, with a little uncertainty on official policy on third party actions -- @wileyj?

@obycode
Copy link
Collaborator

obycode commented Jul 30, 2024

Looks good to me, with a little uncertainty on official policy on third party actions -- @wileyj?

I reviewed the source of that action and it doesn't look like it tries to do anything fishy. Can we lock in that specific version to ensure it remains safe? I remember @wileyj looked at this situation before.

@wileyj
Copy link

wileyj commented Jul 30, 2024

Looks good to me, with a little uncertainty on official policy on third party actions -- @wileyj?

I reviewed the source of that action and it doesn't look like it tries to do anything fishy. Can we lock in that specific version to ensure it remains safe? I remember @wileyj looked at this situation before.

it all depends really - for the stacks-core repo, we lock any external actions to a specific hash vs a version.
there's no official policy/process - but in general we consider the potential blast radius if an external workflow may behave badly in the future.

on occasion, we've forked actions (usually in the case of unclear maintainer) or simply re-implemented ourselves.
if you think there could be security concerns, we do have a repo: stacks-network/actions we could add anything as a composite action - but again, it's really subjective based on what we think the possible issues may be with a malicious workflow.
example of where we use a hash for an external action: https://github.com/stacks-network/actions/blob/main/stacks-core/cache/build-cache/action.yml#L47

and another where we emulated what an external workflow was doing: https://github.com/stacks-network/actions/blob/main/cleanup/workflows/action.yml

tl;dr: it depends.

@obycode
Copy link
Collaborator

obycode commented Jul 30, 2024

I think the main concern would be that a rogue action has access to the secrets and then can do bad things with the Github token, so it's better to be safe.

@obycode
Copy link
Collaborator

obycode commented Jul 30, 2024

I like the idea of adding the hash to ensure this version does not change.

@wileyj
Copy link

wileyj commented Jul 30, 2024

I think the main concern would be that a rogue action has access to the secrets and then can do bad things with the Github token, so it's better to be safe.

indeed - let me look into this a little bit. right now, the workflow is using the org secret, but we can set a new repo secret that is better scoped (i.e. only allow an workflow to create an issue).

however, a lot of the ACL's we'd really like to use are only available for gh enterprise

@wileyj
Copy link

wileyj commented Jul 30, 2024

i think adding something like this to the workflow would be best: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

you may also try using the secrets.GITHUB_TOKEN which is created for the duration of the worklfow (presumably on behalf of the calling actor), and destroyed after the workflow is complete.

if using an external workflow makes you nervous here, there are options to roll your own to create an issue (curl or the gh tool would both work here):
https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow

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.

3 participants