Commit 1ea4caa
fix(workflows): automate weekly SHA staleness check with issue creation (#975)
## Description
This PR automates the weekly SHA staleness security check in the GitHub
workflow.
Previously, the sha-staleness-check workflow only executed the
Test-SHAStaleness.ps1 script but did not create any actionable follow-up
when stale dependencies were detected.
This update improves the workflow by:
Running the Test-SHAStaleness.ps1 script automatically during the weekly
security maintenance workflow.
Parsing the generated sha-staleness-results.json file to detect stale
GitHub Actions or tools.
Automatically creating or updating a tracking GitHub issue when stale
dependencies exceed the defined threshold.
Preventing duplicate issues by updating an existing open issue if one
already exists.
Automatically closing the issue when no stale dependencies are detected
in future runs.
This ensures that outdated GitHub Action SHAs and security tools are
continuously monitored and tracked without requiring manual checks.
---
Related Issue(s)
Fixes #268
## Type of Change
### Code & Documentation
* [x] Bug fix (non-breaking change fixing an issue)
* [ ] New feature (non-breaking change adding functionality)
* [ ] Breaking change (fix or feature causing existing functionality to
change)
* [ ] Documentation update
### Infrastructure & Configuration
* [x] GitHub Actions workflow
* [ ] Linting configuration (markdown, PowerShell, etc.)
* [x] Security configuration
* [ ] DevContainer configuration
* [ ] Dependency update
### AI Artifacts
* [ ] Reviewed contribution with prompt-builder agent and addressed all
feedback
* [ ] Copilot instructions (.github/instructions/*.instructions.md)
* [ ] Copilot prompt (.github/prompts/*.prompt.md)
* [ ] Copilot agent (.github/agents/*.agent.md)
* [ ] Copilot skill (.github/skills/*/SKILL.md)
### Other
* [x] Script/automation (.ps1, .sh, .py)
* [ ] Other (please describe):
---
## Testing Checklist
### Required Checks
* [ ] Documentation is updated (if applicable)
* [x] Files follow existing naming conventions
* [x] Changes are backwards compatible
* [ ] Tests added for new functionality (if applicable)
### Required Automated Checks
The following validation commands must pass before merging:
* Markdown linting: `npm run lint:md`
* Spell checking: `npm run spell-check`
* Frontmatter validation: `npm run lint:frontmatter`
* Skill structure validation: `npm run validate:skills`
* Link validation: `npm run lint:md-links`
* PowerShell analysis: `npm run lint:ps`
* Plugin freshness: `npm run plugin:generate`
---
## Security Considerations
* [x] This PR does not contain any sensitive or NDA information
* [ ] Any new dependencies have been reviewed for security issues
* [x] Security-related scripts follow the principle of least privilege
---
## Additional Notes
This workflow improves long-term repository security maintenance by
automatically detecting stale SHA pins and guiding maintainers to update
them when necessary.
---------
Co-authored-by: Bill Berry <WilliamBerryiii@users.noreply.github.com>
Co-authored-by: Bill Berry <wberry@microsoft.com>1 parent b273a4b commit 1ea4caa
1 file changed
+99
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
0 commit comments