Skip to content

Commit

Permalink
fix: attempt fix token permissions (#1155)
Browse files Browse the repository at this point in the history
## Description
Resolve Code Scanning Token Permissions issues

## Related Issue

Fixes #978 

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)


## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor
Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)
followed
  • Loading branch information
UnicornChance authored Jan 6, 2025
1 parent 29ee12b commit 5a46e41
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/checkpoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

name: Checkpoint UDS Core

# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.
packages: read # Allows reading the content of the repository's packages.
id-token: write

on:
pull_request:
# milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow).
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

name: Metadata

# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.

on:
pull_request:
branches: [main]
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs-shim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

name: CI Docs

# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.

on:
pull_request:
# milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow).
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

name: Publish UDS Core

# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.
packages: read # Allows reading the content of the repository's packages.
id-token: write

on:
# triggered by tag-and-release.yaml and snapshot-release.yaml
workflow_call:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/snapshot-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

name: Release UDS Core Snapshot

# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.
packages: read # Allows reading the content of the repository's packages.
id-token: write

on:
schedule:
- cron: "0 10 * * *"
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

name: Release UDS Core

# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.
packages: read # Allows reading the content of the repository's packages.
id-token: write

on:
push:
branches:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-shim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

name: Test Shim

# Permissions for the GITHUB_TOKEN used by the workflow.
permissions:
contents: read # Allows reading the content of the repository.

on:
# Manual trigger
workflow_dispatch:
Expand Down

0 comments on commit 5a46e41

Please sign in to comment.