Skip to content

Commit 52c12c1

Browse files
authored
Merge pull request #250 from cisagov/security/stop-ignoring-pip-audit-finding
Pin `ansible-core` to `>=2.17.7`
2 parents 2bcc0ca + 4639f0a commit 52c12c1

File tree

7 files changed

+17
-60
lines changed

7 files changed

+17
-60
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
101101
- id: setup-env
102102
uses: cisagov/setup-env-github-action@v1
103-
- uses: actions/checkout@v5
103+
- uses: actions/checkout@v6
104104
- id: setup-python
105105
uses: actions/setup-python@v6
106106
with:
@@ -258,7 +258,7 @@ jobs:
258258
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
259259
- id: setup-env
260260
uses: cisagov/setup-env-github-action@v1
261-
- uses: actions/checkout@v5
261+
- uses: actions/checkout@v6
262262
- id: setup-python
263263
uses: actions/setup-python@v6
264264
with:

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
115115

116116
- name: Checkout repository
117-
uses: actions/checkout@v5
117+
uses: actions/checkout@v6
118118

119119
# Initializes the CodeQL tools for scanning.
120120
- name: Initialize CodeQL

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
9090
- id: checkout-repo
9191
name: Checkout the repository
92-
uses: actions/checkout@v5
92+
uses: actions/checkout@v6
9393
- id: dependency-review
9494
name: Review dependency changes for vulnerabilities and license changes
9595
uses: actions/dependency-review-action@v4

.github/workflows/sync-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
# monitoring configuration *does not* require you to modify
8585
# this workflow.
8686
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
87-
- uses: actions/checkout@v5
87+
- uses: actions/checkout@v6
8888
- name: Sync repository labels
8989
if: success()
9090
uses: crazy-max/ghaction-github-labeler@v5

.pre-commit-config.yaml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,6 @@ repos:
172172
hooks:
173173
- id: pip-audit
174174
args:
175-
# We have to ignore this particular vulnerability in
176-
# ansible-core>=2.11 as there is currently no fix. See
177-
# cisagov/skeleton-ansible-role#210 for more details.
178-
- --ignore-vuln
179-
- GHSA-99w6-3xph-cx78
180175
# We have to ignore this vulnerability since we need to pin
181176
# to Ansible 10 for now to support our CyHy code that must
182177
# still run on Debian Buster. This vulnerability is fixed
@@ -201,10 +196,16 @@ repos:
201196
rev: v3.21.1
202197
hooks:
203198
- id: pyupgrade
199+
args:
200+
# Python 3.10 is currently the oldest non-EOL version of
201+
# Python, so we want to apply all rules that apply to this
202+
# version or later. See here for more details:
203+
# https://www.gyford.com/phil/writing/2025/08/26/how-to-use-pyupgrade/
204+
- --py310-plus
204205

205206
# Ansible hooks
206207
- repo: https://github.com/ansible/ansible-lint
207-
rev: v25.11.0
208+
rev: v25.11.1
208209
hooks:
209210
- id: ansible-lint
210211
additional_dependencies:
@@ -220,31 +221,13 @@ repos:
220221
# hook identifies a vulnerability in ansible-core 2.16.13,
221222
# but all versions of ansible 9 have a dependency on
222223
# ~=2.16.X.
223-
#
224-
# It is also a good idea to go ahead and upgrade to version
225-
# 10 since version 9 is going EOL at the end of November:
226-
# https://endoflife.date/ansible
227224
# - ansible>=10,<11
228-
# ansible-core 2.16.3 through 2.16.6 suffer from the bug
229-
# discussed in ansible/ansible#82702, which breaks any
230-
# symlinked files in vars, tasks, etc. for any Ansible role
231-
# installed via ansible-galaxy. Hence we never want to
232-
# install those versions.
233-
#
234-
# Note that the pip-audit pre-commit hook identifies a
235-
# vulnerability in ansible-core 2.16.13. The pin of
236-
# ansible-core to >=2.17 effectively also pins ansible to
237-
# >=10.
238-
#
239-
# It is also a good idea to go ahead and upgrade to
240-
# ansible-core 2.17 since security support for ansible-core
241-
# 2.16 ends this month:
242-
# https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
225+
# ansible-core<2.17.7 suffers from GHSA-99w6-3xph-cx78.
243226
#
244227
# Note that any changes made to this dependency must also be
245228
# made in requirements.txt in cisagov/skeleton-packer and
246229
# requirements-test.txt in cisagov/skeleton-ansible-role.
247-
- ansible-core>=2.17
230+
- ansible-core>=2.17.7
248231

249232
# Terraform hooks
250233
- repo: https://github.com/antonbabenko/pre-commit-terraform

requirements-test.txt

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,19 @@
11
--requirement requirements.txt
2-
# With the release of version 2.10, Ansible finally correctly
3-
# identifies Kali Linux as being the Kali distribution of the Debian
4-
# OS family. This simplifies a lot of things for roles that support
5-
# Kali Linux, so it makes sense to force the installation of Ansible
6-
# 2.10 or newer.
7-
#
8-
# We need at least version 6 to correctly identify Amazon Linux 2023
9-
# as using the dnf package manager, and version 8 is currently the
10-
# oldest supported version.
11-
#
122
# Version 10 is required because the pip-audit pre-commit hook
133
# identifies a vulnerability in ansible-core 2.16.13, but all versions
144
# of ansible 9 have a dependency on ~=2.16.X.
155
#
16-
# It is also a good idea to go ahead and upgrade to version 10 since
17-
# version 9 is going EOL at the end of November:
18-
# https://endoflife.date/ansible
19-
#
206
# We have tested against version 10. We want to avoid automatically
217
# jumping to another major version without testing, since there are
228
# often breaking changes across major versions. This is the reason
239
# for the upper bound.
2410
ansible>=10,<11
25-
# ansible-core 2.16.3 through 2.16.6 suffer from the bug discussed in
26-
# ansible/ansible#82702, which breaks any symlinked files in vars,
27-
# tasks, etc. for any Ansible role installed via ansible-galaxy.
28-
# Hence we never want to install those versions.
29-
#
30-
# Note that the pip-audit pre-commit hook identifies a vulnerability
31-
# in ansible-core 2.16.13. Normally we would pin ansible-core
32-
# accordingly (>2.16.13), but the above pin of ansible>=10 effectively
33-
# pins ansible-core to >=2.17 so that's what we do here.
34-
#
35-
# It is also a good idea to go ahead and upgrade to ansible-core 2.17
36-
# since security support for ansible-core 2.16 ends this month:
37-
# https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
11+
# ansible-core<2.17.7 suffers from GHSA-99w6-3xph-cx78.
3812
#
3913
# Note that any changes made to this dependency must also be made in
4014
# requirements.txt in cisagov/skeleton-packer and
4115
# .pre-commit-config.yaml in cisagov/skeleton-generic.
42-
ansible-core>=2.17
16+
ansible-core>=2.17.7
4317
# With the release of molecule v5 there were some breaking changes so
4418
# we need to pin at v5 or newer. However, v5.0.0 had an internal
4519
# dependency issue so we must use the bugfix release as the actual

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0
1+
2.1.1

0 commit comments

Comments
 (0)