Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4d88c8b
Add a configuration block for pre-commit.ci
mcdonnnj May 28, 2025
3b58427
Use a version tag for cisagov/setup-env-github-action
mcdonnnj May 15, 2025
f891704
Add a configuration to automatically label pull requests
mcdonnnj Aug 28, 2025
0aba281
Bump actions/labeler from 5 to 6
mcdonnnj Sep 8, 2025
507fe98
Bump actions/setup-python from 5 to 6
dependabot[bot] Sep 8, 2025
428ab61
Bump actions/setup-go from 5 to 6
dependabot[bot] Sep 8, 2025
623a983
Adjust the labels dependabot uses
mcdonnnj Sep 8, 2025
03065cd
Adjust GNU getopt check logic in the `setup-env` script
mcdonnnj Sep 16, 2025
dd78561
Merge pull request #212 from cisagov/improvement/use_tag_not_branch
mcdonnnj Sep 17, 2025
c2a8218
Merge pull request #216 from cisagov/dependabot/github_actions/action…
mcdonnnj Sep 17, 2025
4f7398e
Merge pull request #217 from cisagov/dependabot/github_actions/action…
mcdonnnj Sep 17, 2025
4d30d44
Merge pull request #213 from cisagov/improvement/add_ci_config_to_pre…
mcdonnnj Sep 17, 2025
deb2480
Merge pull request #215 from cisagov/improvement/add_pr_auto_labelling
mcdonnnj Sep 17, 2025
ad43910
Merge pull request #218 from cisagov/improvement/adjust_dependabot_la…
mcdonnnj Sep 17, 2025
b45b24c
Merge pull request #221 from cisagov/improvement/adjust_gnu_getopt_ch…
mcdonnnj Sep 17, 2025
c7e1ce8
Bump actions/checkout from 4 to 5
dependabot[bot] Sep 17, 2025
a27070a
Merge pull request #214 from cisagov/dependabot/github_actions/action…
mcdonnnj Sep 17, 2025
d070095
Update pre-commit hook versions
mcdonnnj May 4, 2025
ee20b2a
Conform to new markdownlint rule
mcdonnnj Aug 29, 2025
5bde44c
Bump version from 0.0.1-rc.1 to 1.0.0
mcdonnnj Sep 17, 2025
37010e5
Merge pull request #220 from cisagov/maintenance/update_pre-commit_hooks
mcdonnnj Sep 17, 2025
131f27a
Merge github.com:cisagov/skeleton-generic into lineage/skeleton
mcdonnnj Sep 17, 2025
a04cc97
Enable new Dependabot ignore directive
mcdonnnj Sep 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ updates:
- dependency-name: actions/cache
- dependency-name: actions/checkout
- dependency-name: actions/dependency-review-action
- dependency-name: actions/labeler
- dependency-name: actions/setup-go
- dependency-name: actions/setup-python
- dependency-name: cisagov/action-job-preamble
Expand All @@ -21,6 +22,12 @@ updates:
- dependency-name: hashicorp/setup-packer
- dependency-name: hashicorp/setup-terraform
- dependency-name: mxschmitt/action-tmate
labels:
# dependabot default we need to replicate
- dependencies
# This matches our label definition in .github/labels.yml as opposed to
# dependabot's default of `github_actions`.
- github-actions
package-ecosystem: github-actions
schedule:
interval: weekly
Expand Down
63 changes: 63 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# Each entry in this file is a label that will be applied to pull requests
# if there is a match based on the matching rules for the entry. Please see
# the actions/labeler documentation for more information:
# https://github.com/actions/labeler#match-object
#
# Note: Verify that the label you want to use is defined in the
# crazy-max/ghaction-github-labeler configuration file located at
# .github/labels.yml.

# Enable if Ansible playbooks are used in the repository.
# ansible:
# - changed-files:
# - any-glob-to-any-file:
# - "**/ansible/**"
dependencies:
- changed-files:
- any-glob-to-any-file:
# Add any dependency files used.
- .pre-commit-config.yaml
- requirements*.txt
documentation:
- changed-files:
- any-glob-to-any-file:
- "**/*.md"
github-actions:
- changed-files:
- any-glob-to-any-file:
- .github/workflows/**
# Enable if Packer is used in the repository.
# packer:
# - changed-files:
# - any-glob-to-any-file:
# - "**/*.pkr.hcl"
# Enable if Python is used in the repository.
# python:
# - changed-files:
# - any-glob-to-any-file:
# - "**/*.py"
# Enable if Terraform is used in the repository.
# terraform:
# - changed-files:
# - any-glob-to-any-file:
# - "**/*.tf"
test:
- changed-files:
- any-glob-to-any-file:
# Add any test-related files or paths.
- .ansible-lint
- .bandit.yml
- .flake8
- .isort.cfg
- .mdl_config.yaml
- .yamllint
upstream update:
- head-branch:
# Any Lineage pull requests should use this branch.
- lineage/skeleton
version bump:
- changed-files:
- any-glob-to-any-file:
# Ensure this matches your version tracking file(s).
- version.txt
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,16 @@ jobs:
# this workflow.
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
- id: setup-env
uses: cisagov/setup-env-github-action@develop
- uses: actions/checkout@v4
uses: cisagov/setup-env-github-action@v1
- uses: actions/checkout@v5
- id: setup-python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ steps.setup-env.outputs.python-version }}
# We need the Go version and Go cache location for the actions/cache step,
# so the Go installation must happen before that.
- id: setup-go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
# There is no expectation for actual Go code so we disable caching as
# it relies on the existence of a go.sum file.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
- id: checkout-repo
name: Checkout the repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- id: dependency-review
name: Review dependency changes for vulnerabilities and license changes
uses: actions/dependency-review-action@v4
93 changes: 93 additions & 0 deletions .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
name: Label pull requests

on: # yamllint disable-line rule:truthy
pull_request:
types:
- edited
- opened
- synchronize

# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace,
# nounset, errexit, and pipefail. The `-x` will print all commands as they are
# run. Please see the GitHub Actions documentation for more information:
# https://docs.github.com/en/actions/using-jobs/setting-default-values-for-jobs
defaults:
run:
shell: bash -Eueo pipefail -x {0}

jobs:
diagnostics:
name: Run diagnostics
# This job does not need any permissions
permissions: {}
runs-on: ubuntu-latest
steps:
# Note that a duplicate of this step must be added at the top of
# each job.
- name: Apply standard cisagov job preamble
uses: cisagov/action-job-preamble@v1
with:
check_github_status: "true"
# This functionality is poorly implemented and has been
# causing problems due to the MITM implementation hogging or
# leaking memory. As a result we disable it by default. If
# you want to temporarily enable it, simply set
# monitor_permissions equal to "true".
#
# TODO: Re-enable this functionality when practical. See
# cisagov/skeleton-generic#207 for more details.
monitor_permissions: "false"
output_workflow_context: "true"
# Use a variable to specify the permissions monitoring
# configuration. By default this will yield the
# configuration stored in the cisagov organization-level
# variable, but if you want to use a different configuration
# then simply:
# 1. Create a repository-level variable with the name
# ACTIONS_PERMISSIONS_CONFIG.
# 2. Set this new variable's value to the configuration you
# want to use for this repository.
#
# Note in particular that changing the permissions
# monitoring configuration *does not* require you to modify
# this workflow.
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
label:
needs:
- diagnostics
permissions:
# Permissions required by actions/labeler
contents: read
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Apply standard cisagov job preamble
uses: cisagov/action-job-preamble@v1
with:
# This functionality is poorly implemented and has been
# causing problems due to the MITM implementation hogging or
# leaking memory. As a result we disable it by default. If
# you want to temporarily enable it, simply set
# monitor_permissions equal to "true".
#
# TODO: Re-enable this functionality when practical. See
# cisagov/skeleton-generic#207 for more details.
monitor_permissions: "false"
# Use a variable to specify the permissions monitoring
# configuration. By default this will yield the
# configuration stored in the cisagov organization-level
# variable, but if you want to use a different configuration
# then simply:
# 1. Create a repository-level variable with the name
# ACTIONS_PERMISSIONS_CONFIG.
# 2. Set this new variable's value to the configuration you
# want to use for this repository.
#
# Note in particular that changing the permissions
# monitoring configuration *does not* require you to modify
# this workflow.
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
- name: Apply suitable labels to a pull request
uses: actions/labeler@v6
2 changes: 1 addition & 1 deletion .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
# monitoring configuration *does not* require you to modify
# this workflow.
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Sync repository labels
if: success()
uses: crazy-max/ghaction-github-labeler@v5
Expand Down
40 changes: 23 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
ci:
# Do not commit changes from running pre-commit for pull requests.
autofix_prs: false
# Autoupdate hooks weekly (this is the default).
autoupdate_schedule: weekly

default_language_version:
# force all unspecified python hooks to run python3
python: python3
Expand All @@ -10,7 +16,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
Expand Down Expand Up @@ -39,38 +45,38 @@ repos:

# Text file hooks
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.44.0
rev: v0.45.0
hooks:
- id: markdownlint
args:
- --config=.mdl_config.yaml
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.5.3
rev: v3.6.2
hooks:
- id: prettier
- repo: https://github.com/adrienverge/yamllint
rev: v1.37.0
rev: v1.37.1
hooks:
- id: yamllint
args:
- --strict

# GitHub Actions hooks
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.32.1
rev: 0.33.3
hooks:
- id: check-github-actions
- id: check-github-workflows

# pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit
rev: v4.2.0
rev: v4.3.0
hooks:
- id: validate_manifest

# Go hooks
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
rev: v1.0.0-rc.2
hooks:
# Go Build
- id: go-build-repo-mod
Expand Down Expand Up @@ -99,7 +105,7 @@ repos:

# Shell script hooks
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.11.0-1
rev: v3.12.0-2
hooks:
- id: shfmt
args:
Expand All @@ -117,13 +123,13 @@ repos:
# Redirect operators are followed by a space
- --space-redirects
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck

# Python hooks
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
rev: 1.8.6
hooks:
- id: bandit
args:
Expand All @@ -133,7 +139,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.1.2
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -143,11 +149,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
rev: v1.18.1
hooks:
- id: mypy
- repo: https://github.com/pypa/pip-audit
rev: v2.8.0
rev: v2.9.0
hooks:
- id: pip-audit
args:
Expand All @@ -159,13 +165,13 @@ repos:
- --requirement
- requirements.txt
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
rev: v3.20.0
hooks:
- id: pyupgrade

# Ansible hooks
- repo: https://github.com/ansible/ansible-lint
rev: v25.4.0
rev: v25.9.0
hooks:
- id: ansible-lint
additional_dependencies:
Expand Down Expand Up @@ -209,7 +215,7 @@ repos:

# Terraform hooks
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.98.0
rev: v1.100.0
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand All @@ -222,7 +228,7 @@ repos:

# Packer hooks
- repo: https://github.com/cisagov/pre-commit-packer
rev: v0.3.0
rev: v0.3.1
hooks:
- id: packer_fmt
- id: packer_validate
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ you can begin to use `pyenv`.
For a list of Python versions that are already installed and ready to
use with `pyenv`, use the command `pyenv versions`. To see a list of
the Python versions available to be installed and used with `pyenv`
use the command `pyenv install --list`. You can read more
[here](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md) about
the many things that `pyenv` can do. See
[here](https://github.com/pyenv/pyenv-virtualenv#usage) for the
additional capabilities that pyenv-virtualenv adds to the `pyenv`
use the command `pyenv install --list`. You can read more about
the [many things that `pyenv` can do](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md).
See the [usage information](https://github.com/pyenv/pyenv-virtualenv#usage)
for the additional capabilities that pyenv-virtualenv adds to the `pyenv`
command.

#### Creating the Python virtual environment ####
Expand Down
Loading