Skip to content

Commit e16ec85

Browse files
committed
security: pin GitHub Actions to commit SHAs for supply-chain security
1 parent 7438715 commit e16ec85

1 file changed

Lines changed: 67 additions & 1 deletion

File tree

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,67 @@
1-
name: Packaging Quality\n\non:\n pull_request:\n paths:\n - 'arch/**'\n - 'debian/**'\n - '.goreleaser.yml'\n - '.github/workflows/packaging-quality.yml'\n push:\n branches: [main, master]\n paths:\n - 'arch/**'\n - 'debian/**'\n - '.goreleaser.yml'\n - '.github/workflows/packaging-quality.yml'\n workflow_dispatch:\n\npermissions:\n contents: read\n\njobs:\n arch-lint:\n name: Arch package validation\n runs-on: ubuntu-latest\n container:\n image: archlinux:base-devel\n steps:\n - name: Install deps\n run: pacman -Syu --noconfirm git go nodejs namcap\n\n - uses: actions/checkout@v4 # v4.2.2\n\n - name: Validate .SRCINFO is in sync\n run: |\n useradd -m builduser || true\n cp arch/PKGBUILD /tmp/PKGBUILD\n chown builduser:builduser /tmp/PKGBUILD\n su builduser -c "cd /tmp && makepkg --printsrcinfo > /tmp/generated.SRCINFO"\n diff -u /tmp/generated.SRCINFO arch/.SRCINFO\n\n - name: Run namcap checks\n run: |\n cp arch/PKGBUILD /tmp/PKGBUILD\n chown builduser:builduser /tmp/PKGBUILD\n su builduser -c "cd /tmp && makepkg --nobuild --nodeps"\n namcap /tmp/PKGBUILD || true\n\n debian-lint:\n name: Debian metadata validation\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4 # v4.2.2\n\n - name: Install packaging tools\n run: |\n sudo apt-get update\n sudo apt-get install -y devscripts lintian\n\n - name: Validate changelog and control\n run: |\n dpkg-parsechangelog >/dev/null\n grep -q "^Standards-Version:" debian/control\n\n - name: Run static lint checks\n run: |\n lintian -i --pedantic --no-tag-display-limit debian/* || true\n
1+
name: Packaging Quality
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'arch/**'
7+
- 'debian/**'
8+
- '.goreleaser.yml'
9+
- '.github/workflows/packaging-quality.yml'
10+
push:
11+
branches: [main, master]
12+
paths:
13+
- 'arch/**'
14+
- 'debian/**'
15+
- '.goreleaser.yml'
16+
- '.github/workflows/packaging-quality.yml'
17+
workflow_dispatch:
18+
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
arch-lint:
24+
name: Arch package validation
25+
runs-on: ubuntu-latest
26+
container:
27+
image: archlinux:base-devel
28+
steps:
29+
- name: Install deps
30+
run: pacman -Syu --noconfirm git go nodejs namcap
31+
32+
- uses: actions/checkout@v4 # v4.2.2
33+
34+
- name: Validate .SRCINFO is in sync
35+
run: |
36+
useradd -m builduser || true
37+
cp arch/PKGBUILD /tmp/PKGBUILD
38+
chown builduser:builduser /tmp/PKGBUILD
39+
su builduser -c "cd /tmp && makepkg --printsrcinfo > /tmp/generated.SRCINFO"
40+
diff -u /tmp/generated.SRCINFO arch/.SRCINFO
41+
42+
- name: Run namcap checks
43+
run: |
44+
cp arch/PKGBUILD /tmp/PKGBUILD
45+
chown builduser:builduser /tmp/PKGBUILD
46+
su builduser -c "cd /tmp && makepkg --nobuild --nodeps"
47+
namcap /tmp/PKGBUILD || true
48+
49+
debian-lint:
50+
name: Debian metadata validation
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4 # v4.2.2
54+
55+
- name: Install packaging tools
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y devscripts lintian
59+
60+
- name: Validate changelog and control
61+
run: |
62+
dpkg-parsechangelog >/dev/null
63+
grep -q "^Standards-Version:" debian/control
64+
65+
- name: Run static lint checks
66+
run: |
67+
lintian -i --pedantic --no-tag-display-limit debian/* || true

0 commit comments

Comments
 (0)