Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 15 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on: # yamllint disable-line rule:truthy
merge_group:
types:
- checks_requested
# We use the default activity types for the pull_request event as specified here:
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
pull_request:
push:
repository_dispatch:
Expand Down Expand Up @@ -118,18 +120,20 @@ jobs:
name: Lookup Go cache directory
run: |
echo "dir=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
- uses: actions/cache@v5
env:
BASE_CACHE_KEY: ${{ github.job }}-${{ runner.os }}-\
py${{ steps.setup-python.outputs.python-version }}-\
go${{ steps.setup-go.outputs.go-version }}-\
packer${{ steps.setup-env.outputs.packer-version }}-\
tf${{ steps.setup-env.outputs.terraform-version }}-
BASE_CACHE_KEY: >-
${{ github.job }}-${{ runner.os
}}-py${{ steps.setup-python.outputs.python-version
}}-go${{ steps.setup-go.outputs.go-version
}}-packer${{ steps.setup-env.outputs.packer-version
}}-tf${{ steps.setup-env.outputs.terraform-version }}-
with:
key: ${{ env.BASE_CACHE_KEY }}\
${{ hashFiles('**/requirements-test.txt') }}-\
${{ hashFiles('**/requirements.txt') }}-\
${{ hashFiles('**/.pre-commit-config.yaml') }}
key: >-
${{ env.BASE_CACHE_KEY }}${{
hashFiles('**/requirements-test.txt') }}-${{
hashFiles('**/requirements.txt') }}-${{
hashFiles('**/.pre-commit-config.yaml') }}
# Note that the .terraform directory IS NOT included in the
# cache because if we were caching, then we would need to use
# the `-upgrade=true` option. This option blindly pulls down the
Expand Down Expand Up @@ -187,7 +191,7 @@ jobs:
-o $(go env GOPATH)/bin/terraform-docs
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip setuptools
pip install --upgrade --requirement requirements-test.txt
- name: Set up pre-commit hook environments
run: pre-commit install-hooks
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
merge_group:
types:
- checks_requested
# We use the default activity types for the pull_request event as specified here:
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
pull_request:
# The branches here must be a subset of the ones in the push key
branches:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on: # yamllint disable-line rule:truthy
merge_group:
types:
- checks_requested
# We use the default activity types for the pull_request event as specified here:
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
pull_request:

# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace,
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/label-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
name: Label pull requests

on: # yamllint disable-line rule:truthy
# We use the default activity types for the pull_request event as specified here:
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
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
Expand Down
26 changes: 13 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,32 @@ repos:

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

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

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

Expand Down Expand Up @@ -131,13 +131,13 @@ repos:

# Python hooks
- repo: https://github.com/PyCQA/bandit
rev: 1.9.1
rev: 1.9.3
hooks:
- id: bandit
args:
- --config=.bandit.yml
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.11.0
rev: 26.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand All @@ -147,18 +147,18 @@ repos:
additional_dependencies:
- flake8-docstrings==1.7.0
- repo: https://github.com/PyCQA/isort
rev: 7.0.0
rev: 8.0.0
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
rev: v1.19.1
hooks:
- id: mypy
additional_dependencies:
- types-PyYAML
- types-requests
- repo: https://github.com/pypa/pip-audit
rev: v2.9.0
rev: v2.10.0
hooks:
- id: pip-audit
args:
Expand All @@ -170,7 +170,7 @@ repos:
- --requirement
- requirements.txt
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.1
rev: v3.21.2
hooks:
- id: pyupgrade
args:
Expand All @@ -182,7 +182,7 @@ repos:

# Ansible hooks
- repo: https://github.com/ansible/ansible-lint
rev: v25.11.1
rev: v26.1.1
hooks:
- id: ansible-lint
additional_dependencies:
Expand All @@ -208,7 +208,7 @@ repos:

# Terraform hooks
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.103.0
rev: v1.105.0
hooks:
- id: terraform_fmt
- id: terraform_validate
Expand Down
6 changes: 4 additions & 2 deletions open-source-policy/practice.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ attribution/source information (such as how and when we learned about a
vulnerability, if the disclosure to us was not public).
- We may wish to withhold some non-CISA IP addresses. If something looks like
an IP address, ask CISA Infrastructure before publishing that info.
- Personally Identifiable Information (PII). Here’s [OMB's definition and GSA's policy](http://www.gsa.gov/portal/content/104256).
18F also has [guidance for systems involving PII](https://pages.18f.gov/before-you-ship/security/pii/).
- Personally Identifiable Information (PII). Here’s [OMB's definition
and GSA's policy](http://www.gsa.gov/portal/content/104256). 18F also
has [guidance for systems involving
PII](https://pages.18f.gov/before-you-ship/security/pii/).
- Some kinds of procurement and acquisition information, which may include
non-public cost or pricing data, contract information, trade secrets, indirect
costs, and direct labor rates. If you’re an CISA team member working with this
Expand Down
6 changes: 2 additions & 4 deletions project_setup/scripts/skeleton
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,12 @@ def clone_repo(parent_repo, new_repo, org, dir=None):
"Commit staged files to the new repository.",
)
print("―" * 80)
print(
f"""
print(f"""
The repository "{parent_repo}" has been cloned and renamed to "{new_repo}".
Use the following commands to push the new repository to github:
cd {os.path.join(dir, new_repo) if dir else new_repo}
git push --set-upstream origin develop
"""
)
""")


def main():
Expand Down
2 changes: 1 addition & 1 deletion setup-env
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ fi
pyenv local "${env_name}"

# Upgrade pip and friends
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install --upgrade pip setuptools

# Find a requirements file (if possible) and install
for req_file in "requirements-dev.txt" "requirements-test.txt" "requirements.txt"; do
Expand Down