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

Check for expired/expiring keys #1

Merged
merged 45 commits into from
Jun 26, 2020
Merged

Check for expired/expiring keys #1

merged 45 commits into from
Jun 26, 2020

Conversation

sumnerwarren
Copy link
Contributor

@sumnerwarren sumnerwarren commented Jun 10, 2020

This PR creates a GitHub Action that checks a repository's blackbox keyring for expired or expiring (in one week) keys and creates an issue for each one that it finds.

You can see how to use it here (though I envision this being triggered via a schedule instead of pushes) and you can see created/updated issues in that repository as well.

@ekasbohm
Copy link

What happens when a key expires again? Is the same issue reopened, or is a new one created? Or would it depend whether the previous issue was closed? Could this action automatically close the issue if there's no longer an expired/expiring key for the user?

@sumnerwarren
Copy link
Contributor Author

It's only looking at open issues. So if an issue were still open when a key expired then a new one would not be created (and I would argue this isn't doing it's job!). If a previous issue had been closed, then a new issue would be created.

It's only querying the first 10 open issues right now under two assumptions:

  1. that these will be dealt with in a somewhat timely manner and not be left open forever
  2. that we are using JIRA (ugh, why) for most work tracking and thus there shouldn't be many open issues in any given repo

Yea, we could add the opposite check: loop through open issues and close them if the key has been updated. My hope is that devs are referencing and closing the issues when the keys are updated via PR, but it wouldn't hurt to have the extra check. I created #2 to track this.

@sumnerwarren sumnerwarren merged commit c1f10e2 into master Jun 26, 2020
@sumnerwarren sumnerwarren deleted the feature/check-keys branch June 26, 2020 20:25
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.

2 participants