Skip to content

Commit fd5360c

Browse files
authored
Merge pull request #40 from cisagov/lineage/skeleton
⚠️ CONFLICT! Lineage pull request for: skeleton
2 parents eb5efdf + b88b94c commit fd5360c

File tree

8 files changed

+38
-42
lines changed

8 files changed

+38
-42
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 7 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:
@@ -253,7 +253,7 @@ jobs:
253253
# monitoring configuration *does not* require you to modify
254254
# this workflow.
255255
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
256-
- uses: actions/checkout@v5
256+
- uses: actions/checkout@v6
257257
- id: setup-python
258258
uses: actions/setup-python@v6
259259
with:
@@ -326,7 +326,7 @@ jobs:
326326
# monitoring configuration *does not* require you to modify
327327
# this workflow.
328328
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
329-
- uses: actions/checkout@v5
329+
- uses: actions/checkout@v6
330330
- name: Finished coveralls reports
331331
uses: coverallsapp/github-action@v2
332332
with:
@@ -380,7 +380,7 @@ jobs:
380380
# monitoring configuration *does not* require you to modify
381381
# this workflow.
382382
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
383-
- uses: actions/checkout@v5
383+
- uses: actions/checkout@v6
384384
- id: setup-python
385385
uses: actions/setup-python@v6
386386
with:
@@ -406,7 +406,7 @@ jobs:
406406
- name: Build artifacts
407407
run: python -m build
408408
- name: Upload artifacts
409-
uses: actions/upload-artifact@v5
409+
uses: actions/upload-artifact@v6
410410
with:
411411
name: dist-${{ matrix.python-version }}
412412
path: dist
@@ -467,7 +467,7 @@ jobs:
467467
# monitoring configuration *does not* require you to modify
468468
# this workflow.
469469
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
470-
- uses: actions/checkout@v5
470+
- uses: actions/checkout@v6
471471
- id: setup-python
472472
uses: actions/setup-python@v6
473473
with:
@@ -488,7 +488,7 @@ jobs:
488488
restore-keys: |
489489
${{ env.BASE_CACHE_KEY }}
490490
- name: Retrieve the built wheel
491-
uses: actions/download-artifact@v6
491+
uses: actions/download-artifact@v7
492492
with:
493493
name: dist-${{ matrix.python-version }}
494494
path: dist

.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: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ repos:
169169
- id: mypy
170170
# IMPORTANT: Keep type hinting-related dependencies of the
171171
# mypy pre-commit hook additional_dependencies in sync with
172-
# the dev section of setup.py to avoid discrepancies in type
173-
# checking between environments.
172+
# the dev section of pyproject.toml to avoid discrepancies in
173+
# type checking between environments.
174174
additional_dependencies:
175175
- types-docopt
176176
- types-requests
@@ -190,10 +190,16 @@ repos:
190190
rev: v3.21.1
191191
hooks:
192192
- id: pyupgrade
193+
args:
194+
# Python 3.10 is currently the oldest non-EOL version of
195+
# Python, so we want to apply all rules that apply to this
196+
# version or later. See here for more details:
197+
# https://www.gyford.com/phil/writing/2025/08/26/how-to-use-pyupgrade/
198+
- --py310-plus
193199

194200
# Ansible hooks
195201
- repo: https://github.com/ansible/ansible-lint
196-
rev: v25.11.0
202+
rev: v25.11.1
197203
hooks:
198204
- id: ansible-lint
199205
additional_dependencies:
@@ -209,31 +215,13 @@ repos:
209215
# hook identifies a vulnerability in ansible-core 2.16.13,
210216
# but all versions of ansible 9 have a dependency on
211217
# ~=2.16.X.
212-
#
213-
# It is also a good idea to go ahead and upgrade to version
214-
# 10 since version 9 is going EOL at the end of November:
215-
# https://endoflife.date/ansible
216218
# - ansible>=10,<11
217-
# ansible-core 2.16.3 through 2.16.6 suffer from the bug
218-
# discussed in ansible/ansible#82702, which breaks any
219-
# symlinked files in vars, tasks, etc. for any Ansible role
220-
# installed via ansible-galaxy. Hence we never want to
221-
# install those versions.
222-
#
223-
# Note that the pip-audit pre-commit hook identifies a
224-
# vulnerability in ansible-core 2.16.13. The pin of
225-
# ansible-core to >=2.17 effectively also pins ansible to
226-
# >=10.
227-
#
228-
# It is also a good idea to go ahead and upgrade to
229-
# ansible-core 2.17 since security support for ansible-core
230-
# 2.16 ends this month:
231-
# https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
219+
# ansible-core<2.17.7 suffers from GHSA-99w6-3xph-cx78.
232220
#
233221
# Note that any changes made to this dependency must also be
234222
# made in requirements.txt in cisagov/skeleton-packer and
235223
# requirements-test.txt in cisagov/skeleton-ansible-role.
236-
- ansible-core>=2.17
224+
- ansible-core>=2.17.7
237225

238226
# Terraform hooks
239227
- repo: https://github.com/antonbabenko/pre-commit-terraform

pyproject.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
44
[build-system]
55
build-backend = "setuptools.build_meta"
6-
requires = ["setuptools"]
6+
requires = [
7+
# 61.0.0 was the first version of setuptools to offer a full-fledged
8+
# backend that uses pyproject.toml for metadata configuration (in
9+
# compliance with PEP 621):
10+
# https://setuptools.pypa.io/en/stable/history.html#v61-0-0
11+
#
12+
# 77.0.0 was the first version of setuptools to support license
13+
# expressions (in compliance with PEP 639):
14+
# https://setuptools.pypa.io/en/stable/history.html#v77-0-0
15+
"setuptools>=77.0.0"
16+
]
717

818
[project]
919
authors = [
@@ -53,6 +63,8 @@ requires-python = ">=3.10"
5363
# field of the mypy pre-commit hook to avoid discrepancies in type
5464
# checking between environments.
5565
dev = [
66+
"build",
67+
"twine",
5668
"types-docopt",
5769
"types-requests",
5870
]

src/cyhy_runner/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
"""The Cyber Hygiene job runner."""
22

3-
# Standard Python Libraries
4-
from typing import List
5-
63
# We disable a Flake8 check for "Module imported but unused (F401)" here because
74
# although this import is not directly used, it populates the value
85
# package_name.__version__, which is used to get version information about this
96
# Python package.
107
from ._version import __version__ # noqa: F401
118

12-
__all__: List[str] = []
9+
__all__: list[str] = []

src/cyhy_runner/cyhy_runner.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import subprocess # nosec
2626
import sys
2727
import time
28-
from typing import Set
2928

3029
# Third-Party Libraries
3130
import daemon
@@ -51,7 +50,7 @@
5150

5251
logger = logging.getLogger(__name__)
5352

54-
running_dirs: Set[str] = set()
53+
running_dirs: set[str] = set()
5554
processes = []
5655
IS_RUNNING = True
5756

@@ -187,7 +186,7 @@ def main():
187186

188187
group = args["--group"]
189188
if group:
190-
print('Setting effective group to "{}".'.format(group), file=sys.stderr)
189+
print(f'Setting effective group to "{group}".', file=sys.stderr)
191190

192191
new_gid = grp.getgrnam(group).gr_gid
193192
os.setegid(new_gid)
@@ -197,7 +196,7 @@ def main():
197196
working_dir = os.path.join(os.getcwd(), args["<working-dir>"])
198197
if not os.path.exists(working_dir):
199198
print(
200-
'Working directory "{}" does not exist.'.format(working_dir),
199+
f'Working directory "{working_dir}" does not exist.',
201200
end="",
202201
file=sys.stderr,
203202
)

0 commit comments

Comments
 (0)