@@ -15,10 +15,19 @@ jobs:
1515 security-events : write
1616
1717 steps :
18- - name : Harden the runner (Audit all outbound calls)
18+ - name : " Harden the runner (Block egress traffic: Only allow calls to allowed endpoints) "
1919 uses : step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
2020 with :
21- egress-policy : audit
21+ egress-policy : block
22+ allowed-endpoints : >+
23+ github.com:443
24+ api.github.com:443
25+ release-assets.githubusercontent.com:443
26+ pypi.org:443
27+ files.pythonhosted.org:443
28+ community.chocolatey.org:443
29+ community.chocolatey.org:80
30+ packages.chocolatey.org:443
2231
2332 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2433
@@ -67,16 +76,81 @@ jobs:
6776 matrix :
6877 platform : [ubuntu-latest, macos-latest, windows-latest]
6978 python-version : ['3.10', '3.11', '3.12', '3.13', '3.14']
79+ include :
80+ - platform : ubuntu-latest
81+ allowed-endpoints : >+
82+ _http._tcp.azure.archive.ubuntu.com:443
83+ _https._tcp.archive.ubuntu.com:443
84+ _https._tcp.dl.google.com:443
85+ _https._tcp.esm.ubuntu.com:443
86+ _https._tcp.motd.ubuntu.com:443
87+ _https._tcp.security.ubuntu.com:443
88+ 0.pool.ntp.org:443
89+ api.github.com:443
90+ archive.ubuntu.com:443
91+ azure.archive.ubuntu.com:443
92+ azure.archive.ubuntu.com:80
93+ cfhcable.dl.sourceforge.net:443
94+ cytranet-dal.dl.sourceforge.net:443
95+ dl.google.com:443
96+ downloads.sourceforge.net:443
97+ esm.ubuntu.com:443
98+ files.pythonhosted.org:443
99+ gigenet.dl.sourceforge.net:443
100+ github.com:443
101+ motd.ubuntu.com:443
102+ netactuate.dl.sourceforge.net:443
103+ pilotfiber.dl.sourceforge.net:443
104+ psychz.dl.sourceforge.net:443
105+ pypi.org:443
106+ release-assets.githubusercontent.com:443
107+ security.ubuntu.com:443
108+ sourceforge.net:443
109+ - platform : macos-latest
110+ allowed-endpoints : >+
111+ api.apple-cloudkit.com:443
112+ api.github.com:443
113+ files.pythonhosted.org:443
114+ formulae.brew.sh:443
115+ gdmf.apple.com:443
116+ ghcr.io:443
117+ github.com:443
118+ init.itunes.apple.com:443
119+ mask.icloud.com:443
120+ mesu.apple.com:443
121+ mirrors.ctan.org:443
122+ ocsp.sectigo.com:80
123+ ocsp2.apple.com:443
124+ pkg-containers.githubusercontent.com:443
125+ pypi.org:443
126+ release-assets.githubusercontent.com:443
127+ - platform : windows-latest
128+ allowed-endpoints : >+
129+ _https._tcp.packages.microsoft.com:443
130+ api.github.com:443
131+ community.chocolatey.org:443
132+ community.chocolatey.org:80
133+ dc.services.visualstudio.com:443
134+ fe2cr.update.microsoft.com:443
135+ files.pythonhosted.org:443
136+ github.com:443
137+ mobile.events.data.microsoft.com:443
138+ packages.chocolatey.org:443
139+ packages.microsoft.com:443
140+ pypi.org:443
141+ release-assets.githubusercontent.com:443
142+ ziglang.org:443
70143 runs-on : ${{ matrix.platform }}
71144 permissions :
72145 contents : read
73146 security-events : write
74147
75148 steps :
76- - name : Harden the runner (Audit all outbound calls)
149+ - name : " Harden the runner (Block egress traffic: Only allow calls to allowed endpoints) "
77150 uses : step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
78151 with :
79- egress-policy : audit
152+ egress-policy : block
153+ allowed-endpoints : ${{ matrix.allowed-endpoints }}
80154
81155 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
82156
0 commit comments