Skip to content

Commit fd05c9a

Browse files
authored
Merge pull request #5955 from kmk3/build-codespell-improvements
build: codespell improvements
2 parents e6b7fdf + b2821a3 commit fd05c9a

12 files changed

+64
-33
lines changed

.github/workflows/build-extra.yml

+2-22
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- .github/pull_request_template.md
1414
- .github/workflows/build.yml
1515
- .github/workflows/codeql-analysis.yml
16+
- .github/workflows/codespell.yml
1617
- .github/workflows/profile-checks.yml
1718
- .gitignore
1819
- .gitlab-ci.yml
@@ -35,6 +36,7 @@ on:
3536
- .github/pull_request_template.md
3637
- .github/workflows/build.yml
3738
- .github/workflows/codeql-analysis.yml
39+
- .github/workflows/codespell.yml
3840
- .github/workflows/profile-checks.yml
3941
- .gitignore
4042
- .gitlab-ci.yml
@@ -163,25 +165,3 @@ jobs:
163165
- run: cppcheck --version
164166
- name: cppcheck
165167
run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance .
166-
codespell:
167-
runs-on: ubuntu-22.04
168-
steps:
169-
- name: Harden Runner
170-
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
171-
with:
172-
egress-policy: block
173-
allowed-endpoints: >
174-
archive.ubuntu.com:80
175-
azure.archive.ubuntu.com:80
176-
github.com:443
177-
packages.microsoft.com:443
178-
ppa.launchpadcontent.net:443
179-
security.ubuntu.com:80
180-
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
181-
- name: update package information
182-
run: sudo apt-get update -qy
183-
- name: install dependencies
184-
run: sudo apt-get install -qy codespell
185-
- run: codespell --version
186-
- name: codespell
187-
run: make codespell

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- .github/pull_request_template.md
1010
- .github/workflows/build-extra.yml
1111
- .github/workflows/codeql-analysis.yml
12+
- .github/workflows/codespell.yml
1213
- .github/workflows/profile-checks.yml
1314
- .gitignore
1415
- .gitlab-ci.yml
@@ -26,6 +27,7 @@ on:
2627
- .github/pull_request_template.md
2728
- .github/workflows/build-extra.yml
2829
- .github/workflows/codeql-analysis.yml
30+
- .github/workflows/codespell.yml
2931
- .github/workflows/profile-checks.yml
3032
- .gitignore
3133
- .gitlab-ci.yml

.github/workflows/codeql-analysis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- .github/pull_request_template.md
1919
- .github/workflows/build-extra.yml
2020
- .github/workflows/build.yml
21+
- .github/workflows/codespell.yml
2122
- .github/workflows/profile-checks.yml
2223
- .gitignore
2324
- .gitlab-ci.yml
@@ -40,6 +41,7 @@ on:
4041
- .github/pull_request_template.md
4142
- .github/workflows/build-extra.yml
4243
- .github/workflows/build.yml
44+
- .github/workflows/codespell.yml
4345
- .github/workflows/profile-checks.yml
4446
- .gitignore
4547
- .gitlab-ci.yml

.github/workflows/codespell.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Codespell
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'm4/**'
7+
- COPYING
8+
pull_request:
9+
paths-ignore:
10+
- 'm4/**'
11+
- COPYING
12+
13+
permissions: # added using https://github.com/step-security/secure-workflows
14+
contents: read
15+
16+
jobs:
17+
codespell:
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Harden Runner
21+
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
22+
with:
23+
egress-policy: block
24+
allowed-endpoints: >
25+
archive.ubuntu.com:80
26+
azure.archive.ubuntu.com:80
27+
github.com:443
28+
packages.microsoft.com:443
29+
ppa.launchpadcontent.net:443
30+
security.ubuntu.com:80
31+
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
32+
- name: update package information
33+
run: sudo apt-get update -qy
34+
- name: install dependencies
35+
run: sudo apt-get install -qy codespell
36+
- name: configure
37+
run: ./configure || (cat config.log; exit 1)
38+
- run: codespell --version
39+
- name: codespell
40+
run: make codespell

Makefile

+9-2
Original file line numberDiff line numberDiff line change
@@ -366,9 +366,16 @@ cppcheck: clean
366366
scan-build: clean
367367
scan-build $(MAKE)
368368

369+
# TODO: Old codespell versions (such as v2.1.0 in CI) have issues with
370+
# contrib/syscalls.sh
369371
.PHONY: codespell
370-
codespell: clean
371-
codespell --ignore-regex "UE|creat|doas|ether|isplay|shotcut" src test
372+
codespell:
373+
@printf 'Running %s...\n' $@
374+
@codespell --ignore-regex 'UE|als|chage|creat|doas|ether|isplay|readby|[Ss]hotcut' \
375+
-S *.gz,*.o,*.so \
376+
-S COPYING,m4 \
377+
-S ./contrib/syscalls.sh \
378+
.
372379

373380
.PHONY: print-env
374381
print-env:

RELNOTES

+2-2
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ firejail (0.9.62) baseline; urgency=low
363363
* whitelisting /usr/share in a large number of profiles
364364
* new scripts in contrib: gdb-firejail.sh and sort.py
365365
* enhancement: whitelist /usr/share in some profiles
366-
* added signal mediation ot apparmor profile
366+
* added signal mediation to apparmor profile
367367
* new conditions: HAS_X11, HAS_NET
368368
* new profiles: qgis, klatexformula, klatexformula_cmdl, links, xlinks
369369
* new profiles: pandoc, teams-for-linux, OpenArena, gnome-sound-recorder
@@ -758,7 +758,7 @@ firejail (0.9.44.4) baseline; urgency=low
758758

759759
firejail (0.9.44.2) baseline; urgency=low
760760
* security: overwrite /etc/resolv.conf found by Martin Carpenter (CVE-2016-10118)
761-
* secuirty: TOCTOU exploit for --get and --put found by Daniel Hodson
761+
* security: TOCTOU exploit for --get and --put found by Daniel Hodson
762762
* security: invalid environment exploit found by Martin Carpenter (CVE-2016-10122)
763763
* security: several security enhancements
764764
* bugfix: crashing VLC by pressing Ctrl-O

contrib/jail_prober.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ def run_firejail(program, all_args):
151151
if arg:
152152
myargs.insert(-1, arg)
153153
subprocess.call(myargs)
154-
ans = input('Did %s run correctly? [y]/n ' % program)
155-
if ans in ['n', 'N']:
154+
answer = input('Did %s run correctly? [y]/n ' % program)
155+
if answer in ['n', 'N']:
156156
bad_args.append(arg)
157157
elif arg:
158158
good_args.insert(-1, arg)

etc/profile-a-l/kwin_x11.profile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include kwin_x11.local
55
# Persistent global definitions
66
include globals.local
77

8-
# fix automatical kwin_x11 sandboxing:
8+
# fix automatic kwin_x11 sandboxing:
99
# echo KDEWM=kwin_x11 >> ~/.pam_environment
1010

1111
noblacklist ${HOME}/.cache/kwin

etc/profile-m-z/tvbrowser.profile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Firejail profile for tvbrowser
2-
# Description: java tv programm form tvbrowser.org
2+
# Description: java tv program form tvbrowser.org
33
# This file is overwritten after every install/update
44
# Persistent local customizations
55
include tvbrowser.local

etc/profile-m-z/twitch.profile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Firejail profile for twitch
2-
# Description: Unofficial electron based desktop warpper for Twitch
2+
# Description: Unofficial electron based desktop wrapper for Twitch
33
# This file is overwritten after every install/update
44
# Persistent local customizations
55
include twitch.local

etc/profile-m-z/youtube.profile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Firejail profile for youtube
2-
# Description: Unofficial electron based desktop warpper for YouTube
2+
# Description: Unofficial electron based desktop wrapper for YouTube
33
# This file is overwritten after every install/update
44
# Persistent local customizations
55
include youtube.local

etc/profile-m-z/youtubemusic-nativefier.profile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Firejail profile for youtubemusic-nativefier
2-
# Description: Unofficial electron based desktop warpper for YouTube Music
2+
# Description: Unofficial electron based desktop wrapper for YouTube Music
33
# This file is overwritten after every install/update
44
# Persistent local customizations
55
include youtube.local

0 commit comments

Comments
 (0)