Skip to content

Commit 9edab87

Browse files
committed
minor #259 Add Zizmor, Dependabot, and upgrade+pin actions (Kocal)
This PR was merged into the 2.x branch. Discussion ---------- Add Zizmor, Dependabot, and upgrade+pin actions | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update CHANGELOG.md file --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Commits ------- 42e1d0c Add Zizmor, Dependabot, and upgrade+pin actions
2 parents fee5542 + 42e1d0c commit 9edab87

5 files changed

Lines changed: 77 additions & 23 deletions

File tree

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://docs.github.com/en/code-security/reference/supply-chain-security/dependabot-options-reference
2+
3+
version: 2
4+
updates:
5+
# GitHub Actions
6+
- package-ecosystem: 'github-actions'
7+
directory: '/'
8+
schedule:
9+
interval: 'weekly'
10+
groups:
11+
github-actions:
12+
patterns:
13+
- '*'
14+
cooldown:
15+
default-days: 7

.github/workflows/ci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ on:
88

99
jobs:
1010
tests:
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-latest
12+
permissions: {}
1213

1314
strategy:
1415
fail-fast: false
@@ -39,11 +40,13 @@ jobs:
3940
SYMFONY_REQUIRE: ${{ matrix.symfony-version || '>=5.4' }}
4041

4142
steps:
42-
- name: "Checkout code"
43-
uses: "actions/checkout@v2"
43+
- name: Checkout
44+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
45+
with:
46+
persist-credentials: false
4447

45-
- name: "Install PHP"
46-
uses: "shivammathur/setup-php@v2"
48+
- name: Setup PHP
49+
uses: shivammathur/setup-php@083d5237d9340d541bf95e2a6eceaf3529b85892
4750
with:
4851
coverage: "none"
4952
php-version: "${{ matrix.php-version }}"
@@ -56,7 +59,7 @@ jobs:
5659
run: composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }} --ansi
5760

5861
- name: "Composer install"
59-
uses: "ramsey/composer-install@v2"
62+
uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6
6063
with:
6164
dependency-versions: "${{ matrix.dependency-version }}"
6265
composer-options: "--prefer-dist --no-progress"

.github/workflows/fabbot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
jobs:
1010
call-fabbot:
1111
name: Fabbot
12-
uses: symfony-tools/fabbot/.github/workflows/fabbot.yml@main
12+
uses: symfony-tools/fabbot/.github/workflows/fabbot.yml@main # zizmor: ignore[unpinned-uses]
1313
with:
1414
package: WebpackEncoreBundle
1515
check_license: true

.github/workflows/static.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,27 @@ name: Static analysis
44
jobs:
55
phpstan:
66
name: PHPStan
7-
runs-on: ubuntu-22.04
7+
runs-on: ubuntu-latest
8+
permissions: {}
89

910
steps:
10-
- name: Checkout code
11-
uses: actions/checkout@v2
11+
- name: Checkout
12+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
13+
with:
14+
persist-credentials: false
1215

1316
- name: Setup PHP
14-
uses: shivammathur/setup-php@v2
17+
uses: shivammathur/setup-php@083d5237d9340d541bf95e2a6eceaf3529b85892
1518
with:
1619
php-version: 8.1
1720
coverage: none
1821
tools: cs2pr
1922

2023
- name: Download dependencies
21-
uses: ramsey/composer-install@v1
24+
uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6
2225

2326
- name: Install PHPStan
24-
uses: ramsey/composer-install@v1
27+
uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6
2528
with:
2629
composer-options: "--working-dir=tools/phpstan"
2730

@@ -30,23 +33,27 @@ jobs:
3033

3134
psalm:
3235
name: Psalm
33-
runs-on: ubuntu-22.04
36+
runs-on: ubuntu-latest
37+
permissions: {}
38+
3439
steps:
35-
- name: Checkout code
36-
uses: actions/checkout@v2
40+
- name: Checkout
41+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
42+
with:
43+
persist-credentials: false
3744

3845
- name: Setup PHP
39-
uses: shivammathur/setup-php@v2
46+
uses: shivammathur/setup-php@083d5237d9340d541bf95e2a6eceaf3529b85892
4047
with:
4148
php-version: 8.1
4249
coverage: none
4350
tools: vimeo/psalm:4.11.2
4451

4552
- name: Download dependencies
46-
uses: ramsey/composer-install@v1
53+
uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6
4754

4855
- name: Install psalm
49-
uses: ramsey/composer-install@v1
56+
uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6
5057
with:
5158
composer-options: "--working-dir=tools/psalm"
5259

@@ -55,18 +62,21 @@ jobs:
5562

5663
composer-normalize:
5764
name: Composer Normalize
58-
runs-on: ubuntu-22.04
65+
runs-on: ubuntu-latest
66+
permissions: {}
5967

6068
steps:
6169
- name: Setup PHP
62-
uses: shivammathur/setup-php@v2
70+
uses: shivammathur/setup-php@083d5237d9340d541bf95e2a6eceaf3529b85892
6371
with:
6472
php-version: 8.1
6573
coverage: none
6674
tools: composer-normalize
6775

68-
- name: Checkout code
69-
uses: actions/checkout@v2
76+
- name: Checkout
77+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
78+
with:
79+
persist-credentials: false
7080

7181
- name: Normalize
7282
run: composer-normalize --dry-run

.github/workflows/zizmor.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['**']
8+
9+
permissions: {}
10+
11+
jobs:
12+
zizmor:
13+
name: Run zizmor 🌈
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
17+
contents: read # Only needed for private repos. Needed to clone the repo.
18+
actions: read # Only needed for private repos. Needed for upload-sarif to read workflow run info.
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
22+
with:
23+
persist-credentials: false
24+
25+
- name: Run zizmor 🌈
26+
uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6

0 commit comments

Comments
 (0)