Skip to content

Commit

Permalink
[chore] update global permissions on workflows (#10541)
Browse files Browse the repository at this point in the history
This addresses security concerns around permissions for workflows.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten committed Jul 4, 2024
1 parent 18e78af commit fab211d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/check-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+*"
pull_request:

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/generate-semantic-conventions-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name: Generate Semantic Conventions PR
on:
schedule:
# Daily at 01:30 (UTC)
- cron: '30 1 * * *'
- cron: "30 1 * * *"
workflow_dispatch:

permissions:
contents: read

jobs:
check-versions:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -47,7 +50,7 @@ jobs:
update-semantic-conventions:
permissions:
contents: write # for Git to git push
contents: write # for Git to git push
runs-on: ubuntu-latest
if: |
needs.check-versions.outputs.already-added != 'true' &&
Expand Down Expand Up @@ -94,7 +97,7 @@ jobs:
--base main)
pull_request_number=${url//*\//}
# see the template for change log entry file at blob/main/.chloggen/TEMPLATE.yaml
cat > .chloggen/semconv-$VERSION.yaml << EOF
change_type: enhancement
Expand Down

0 comments on commit fab211d

Please sign in to comment.