Files
cozystack/.github/workflows/stale.yaml
T
Myasnikov Daniil 76ad921fdd ci: harden workflow token permissions and pin actions by SHA
Raise the OpenSSF Scorecard Token-Permissions and Pinned-Dependencies
checks (both currently 0/10) ahead of CNCF Incubation due diligence:

- Declare a top-level read-only default (permissions: contents: read) in
  every workflow, plus an explicit per-job permissions: block that grants
  only the writes that job actually needs. Workflows that previously held
  write scopes at the workflow level (backport, pr-labeler, pr-size,
  stale) now hold them at job level instead.
- Pin every GitHub-owned and third-party action to a full commit SHA with
  a version comment. scorecard.yml was already pinned in #2721.

No triggers, job graph, or step logic change; only token scopes and
action refs. Self-hosted release jobs keep the exact write scopes they
already declared.

Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Assisted-By: Claude <noreply@anthropic.com>
2026-06-23 11:32:16 +05:00

59 lines
2.3 KiB
YAML

name: Stale issues
on:
schedule:
- cron: '37 4 * * *' # daily at 04:37 UTC
workflow_dispatch:
# Top-level token defaults to read-only; jobs request the minimum extra scopes.
permissions:
contents: read
concurrency:
group: stale
cancel-in-progress: false
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10
with:
stale-issue-label: lifecycle/stale
stale-pr-label: lifecycle/stale
close-issue-label: lifecycle/rotten
close-pr-label: lifecycle/rotten
# Exempt lists differ on purpose: issues sit longer than PRs by nature.
# An accepted issue (`triage/accepted`) is a known long-tail task, not stale;
# a held PR (`do-not-merge/hold`) is paused intentionally and shouldn't auto-close.
# Priority/security/regression labels protect issues that someone explicitly
# decided to keep visible.
exempt-issue-labels: >-
lifecycle/frozen,epic,
priority/critical-urgent,priority/important-soon,priority/important-longterm,
security/critical,security/high,security/confirmed,
security/triage-needed,security/in-progress,
triage/accepted,kind/regression
exempt-pr-labels: >-
lifecycle/frozen,do-not-merge/hold,
backport,backport-previous
days-before-stale: 60
days-before-close: 14
operations-per-run: 100
remove-stale-when-updated: true
stale-issue-message: |
This issue has had no activity for 60 days and was marked `lifecycle/stale`.
It will be closed in 14 days unless commented or labelled `lifecycle/frozen`.
stale-pr-message: |
This PR has had no activity for 60 days and was marked `lifecycle/stale`.
It will be closed in 14 days unless commented or labelled `lifecycle/frozen`.
close-issue-message: |
Closed because no activity followed the `lifecycle/stale` warning.
Reopen if the issue is still relevant.
close-pr-message: |
Closed because no activity followed the `lifecycle/stale` warning.
Reopen if the change is still wanted.