Skip to content

Commit

Permalink
Merge pull request #937 from mattmoor/audit-permissions
Browse files Browse the repository at this point in the history
Audit the permissions of workflows.
  • Loading branch information
imjasonh authored Jan 18, 2024
2 parents d50de70 + 394599c commit a1b0f9f
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 146 deletions.
131 changes: 0 additions & 131 deletions .github/workflows/add-issues.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: ci

on:
pull_request:
push:
branches:
- 'main'
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
name: build
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: e2e melange bootstrap + build

on:
push:
branches:
- 'main'
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
SOURCE_DATE_EPOCH: 1669683910
Expand All @@ -14,6 +14,9 @@ jobs:
name: build examples
runs-on: ubuntu-latest

permissions:
contents: read

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -53,6 +56,9 @@ jobs:
name: build example on kubernetes
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Expand Down Expand Up @@ -90,6 +96,10 @@ jobs:
bootstrap:
name: bootstrap package
runs-on: ubuntu-latest

permissions:
contents: read

container:
image: alpine:latest
options: |
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/go-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: Go Tests

on:
push:
branches:
- main
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
test:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/melange-test-pipelines.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Test melange test command

on:
pull_request:
push:
branches:
- 'main'
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-melange:
name: Build melange and add to artifact cache
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Expand All @@ -36,6 +39,9 @@ jobs:
# TODO: Set up a larger runner for this.
runs-on: ubuntu-latest

permissions:
contents: read

# This is a list of packages which we want to test against.
# Feel free to add additional packages to this matrix which exercise
# Melange `test` in new ways (e.g. new pipelines, etc.)
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ name: verify

on:
push:
branches:
- "main"
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
golangci:
name: lint
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/wolfi-presubmit.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: ci

on:
pull_request:
push:
branches:
- 'main'
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build-melange:
name: Build melange and add to artifact cache
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Expand All @@ -36,6 +39,9 @@ jobs:
# TODO: Set up a larger runner for this.
runs-on: ubuntu-latest

permissions:
contents: read

# This is a list of packages which covers basic and exotic uses of
# the built-in pipelines. Goal is to balance efficiency while also
# exercising Melange with real-world package builds.
Expand Down

0 comments on commit a1b0f9f

Please sign in to comment.