Commit Graph
1300 Commits
Author SHA1 Message Date
bdc03d0a7f ci: add semgrep SAST scanning to CI and pre-commit (#14964)
* ci: add semgrep SAST scanning to CI and pre-commit

Add semgrep static analysis to the security workflow and pre-commit
hooks. Uses `--config auto` for comprehensive coverage across Python,
Dockerfile, and GitHub Actions. The intentional `USER root` in the
Dockerfile (required for bind mount compatibility) is excluded via
`--exclude-rule`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: pin semgrep container image to digest for zizmor

Pin semgrep/semgrep to sha256 digest (v1.151.0) to satisfy
zizmor's unpinned-images audit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: add zizmor pre-commit hook for Actions security audit

Matches the existing actionlint pattern — gracefully skips if zizmor
is not installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 11:59:30 -05:00
984831bcab fix: add explicit bool filters for Ansible 12 jinja2_native compatibility (#14963)
* fix: add explicit bool filters for Ansible 12 jinja2_native compatibility

Ansible 12 enables jinja2_native by default, which means string values
like "true"/"false" are no longer automatically coerced to booleans in
when: conditions and Jinja2 if statements. Add | bool filters to all
boolean variable references in tasks, templates, and handlers.

Also reformats long single-line Jinja2 conditionals into multi-line for
readability, fixes GCE default() calls for native mode, adds help
command to the algo script, and updates test fixtures to register the
bool filter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* ci: add j2lint for Jinja2 template linting

Add j2lint (aristanetworks/j2lint) to catch syntax errors, spacing
issues, and operator formatting in Jinja2 templates. Integrated into
pre-commit hooks, lint.yml CI, and smart-tests.yml.

Rules S3/S5/S6/S7/V1 are ignored — they enforce conventions
incompatible with Ansible's config-file-embedded templates.

Also fixes int+1 → int + 1 operator spacing in server.conf.j2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve all ansible-lint warnings and enforce zero-tolerance policy

Fix 18 jinja[spacing] errors across 12 files by moving Jinja2 block
delimiters to prevent YAML >- folding from introducing trailing spaces.

Fix 27 key-order[task] warnings across 17 files by reordering task keys
to canonical order (name → when → tags → environment → become → block).

Promote key-order[task] and yaml[line-length] from warn_list to hard
errors by removing warn_list entirely from .ansible-lint.

Add zero-tolerance warning policy to CLAUDE.md explaining why warnings
are unacceptable in a security tool and documenting resolution order.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 11:21:56 -05:00
0056bc725c docs: add non-interactive deployment reference to CLAUDE.md (#14962)
Document all variables and environment variable fallbacks that enable
fully headless deployment, so LLM agents and CI pipelines can discover
how to deploy without interactive prompts.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 10:37:14 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
29706d33e2 chore(deps): bump the python group with 4 updates (#14961)
Bumps the python group with 4 updates: [boto3](https://github.com/boto/boto3), [azure-mgmt-compute](https://github.com/Azure/azure-sdk-for-python), [google-auth](https://github.com/googleapis/google-auth-library-python) and [hcloud](https://github.com/hetznercloud/hcloud-python).


Updates `boto3` from 1.42.33 to 1.42.36
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.42.33...1.42.36)

Updates `azure-mgmt-compute` from 37.1.0 to 37.2.0
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-mgmt-compute_37.1.0...azure-mgmt-compute_37.2.0)

Updates `google-auth` from 2.47.0 to 2.48.0
- [Release notes](https://github.com/googleapis/google-auth-library-python/releases)
- [Changelog](https://github.com/googleapis/google-auth-library-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-auth-library-python/compare/v2.47.0...v2.48.0)

Updates `hcloud` from 2.15.0 to 2.16.0
- [Release notes](https://github.com/hetznercloud/hcloud-python/releases)
- [Changelog](https://github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hetznercloud/hcloud-python/compare/v2.15.0...v2.16.0)

---
updated-dependencies:
- dependency-name: boto3
  dependency-version: 1.42.36
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python
- dependency-name: azure-mgmt-compute
  dependency-version: 37.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python
- dependency-name: google-auth
  dependency-version: 2.48.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python
- dependency-name: hcloud
  dependency-version: 2.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-08 09:24:18 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ac62f8dbe9 chore(deps): bump docker/login-action in the github-actions group (#14960)
Bumps the github-actions group with 1 update: [docker/login-action](https://github.com/docker/login-action).


Updates `docker/login-action` from 3.6.0 to 3.7.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/5e57cd118135c172c3672efd75eb46360885c0ef...c94ce9fb468520275223c153574b00df6fe4bcc9)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-08 09:24:08 -05:00
c5b88a77b7 test: validate config.cfg against deprecated cloud instance types (#14958)
Replace toy data tests with actual config.cfg validation to catch
deprecated instance types before deployment fails. Checks for:

- Hetzner Intel CX series (removed Sept 2024, use AMD CPX)
- DigitalOcean old naming scheme (use s-*vcpu-* format)
- EC2 previous gen types (unavailable in VPC)

Also adds basic sanity checks for required fields and malformed values.

Refs #14730

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 01:32:44 -05:00
8bdac1db4e security: remove unused sshpubkeys dependency (CVE-2024-23342) (#14957)
Remove sshpubkeys from cloudstack extras to eliminate the vulnerable
python-ecdsa transitive dependency. The sshpubkeys package was declared
but never actually imported or used anywhere in the codebase - CloudStack
role uses Ansible collection modules, not this Python package.

CVE-2024-23342 is a high severity Minerva timing attack affecting all
versions of python-ecdsa with no fix planned by maintainers.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 01:10:12 -05:00
21e21747ea ci: modernize tooling with prek, ty, and security scanning (#14956)
* ci: modernize tooling with prek, ty, and security scanning

Migrate from pre-commit to prek (Rust-native, faster hooks) and add
comprehensive CI improvements for code quality and security.

Changes:
- Replace pre-commit with prek for git hooks
- Add ty type checker (Rust-based, replaces mypy)
- Expand ruff rules: security (S), simplify (SIM), commented code (ERA)
- Add pip-audit workflow for Python dependency CVE scanning
- Add actionlint and zizmor for GitHub Actions linting/security
- Add ruff format check to CI
- Enable stricter ansible-lint rules (no-changed-when, risky-file-permissions)
- Remove obsolete Claude workflow files
- Apply ruff formatting fixes to test files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): resolve actionlint install and ty type errors

- Use actionlint's official install script instead of broken URL pattern
- Exclude test mock modules from ty type checking
- Run workflows on push only for main/master to avoid duplicate PR runs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): use glob pattern for actionlint, exclude all tests from ty

- actionlint requires *.yml glob, not directory path
- Exclude all tests from ty type checking (test code has looser typing)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): quote shell variables to fix shellcheck warnings

Fix SC2046/SC2086 warnings in workflow scripts:
- Quote $(uname -r) in apt-get install
- Quote $(pwd) in docker volume mount
- Quote $existing in gh issue comment

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): move key-order[task] to warn_list

Too many existing violations in the codebase to enable as error.
Move to warn_list for gradual fixes over time.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 00:10:05 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4d462eed57 chore(deps): bump boto3 from 1.42.31 to 1.42.33 in the python group (#14955)
Bumps the python group with 1 update: [boto3](https://github.com/boto/boto3).


Updates `boto3` from 1.42.31 to 1.42.33
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.42.31...1.42.33)

---
updated-dependencies:
- dependency-name: boto3
  dependency-version: 1.42.33
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 23:28:23 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
264ed2b7ad chore(deps): bump actions/setup-python in the github-actions group (#14954)
Bumps the github-actions group with 1 update: [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/setup-python` from 6.1.0 to 6.2.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/83679a892e2d95755f2dac6acb0bfd1e9ac5d548...a309ff8b426b58ec0e2a45f0f869d46889d02405)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 23:13:03 -05:00
1ea11eefb9 fix: GCE region selection displays complete names instead of characters (#14953)
The Jinja2 template was building a string that looked like a list
instead of an actual list. When Ansible iterated over this string,
it yielded one character per iteration, causing the region prompt
to display:
  1. [
  2. '
  3. a
  ...

Now follows the pattern used by other cloud providers (EC2, DigitalOcean,
etc.) by storing region objects directly and accessing .name property.

Fixes #14944

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:09:15 -05:00
9bced9c6ad fix(ec2): change default instance type from t2.micro to t3.micro (#14952)
The T2 instance family is legacy and not available in newer AWS regions
like il-central-1 (Israel). Changing to t3.micro ensures deployments
work in all regions.

T3 instances offer better performance than T2 and are still covered
under the AWS Free Tier.

Fixes #14947

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:53:15 -05:00
genevera (she/her)andGitHub 6fa8a11c69 fix(aip): correct assertion for SNAT IPv4 address validation (#14949) 2026-01-29 22:47:23 -05:00
373871674d docs: add tests vs filters pattern for boolean checks (#14951)
Tests (`is X`) return native booleans; filters (`| X`) return data.
Use tests in assert.that and when: clauses.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:37:41 -05:00
dependabot[bot]andGitHub 0160b762c5 chore(deps): bump the python group with 4 updates (#14946) 2026-01-28 13:19:34 -05:00
dependabot[bot]andGitHub 4996ab35bd chore(deps): bump actions/checkout in the github-actions group (#14945) 2026-01-28 13:19:03 -05:00
dependabot[bot]andGitHub 028372e1cc chore(deps): bump the python group with 2 updates (#14943) 2026-01-21 07:31:54 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
23f3e81ea4 chore(deps): bump azure-core from 1.35.0 to 1.38.0 (#14942)
Bumps [azure-core](https://github.com/Azure/azure-sdk-for-python) from 1.35.0 to 1.38.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-python/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-python/compare/azure-core_1.35.0...azure-core_1.38.0)

---
updated-dependencies:
- dependency-name: azure-core
  dependency-version: 1.38.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-16 15:23:28 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6f742eaf41 chore(deps): bump virtualenv from 20.34.0 to 20.36.1 (#14941)
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.34.0 to 20.36.1.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/virtualenv/compare/20.34.0...20.36.1)

---
updated-dependencies:
- dependency-name: virtualenv
  dependency-version: 20.36.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-16 15:18:35 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ae4b8b6cdf chore(deps): bump filelock from 3.19.1 to 3.20.3 (#14939)
Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.19.1 to 3.20.3.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.19.1...3.20.3)

---
updated-dependencies:
- dependency-name: filelock
  dependency-version: 3.20.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-16 15:18:30 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
534412a1e2 chore(deps): bump urllib3 from 2.5.0 to 2.6.3 (#14940)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.5.0 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.5.0...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-16 15:11:04 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
549fd0220a chore(deps): bump pyasn1 from 0.6.1 to 0.6.2 (#14938)
Bumps [pyasn1](https://github.com/pyasn1/pyasn1) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/pyasn1/pyasn1/releases)
- [Changelog](https://github.com/pyasn1/pyasn1/blob/main/CHANGES.rst)
- [Commits](https://github.com/pyasn1/pyasn1/compare/v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: pyasn1
  dependency-version: 0.6.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-16 15:07:54 -05:00
dependabot[bot]andGitHub 5c967ad35e chore(deps): bump the python group with 2 updates (#14937) 2026-01-14 11:36:37 -05:00
dependabot[bot]andGitHub e566fe467e chore(deps): bump boto3 from 1.42.16 to 1.42.19 in the python group (#14936) 2026-01-07 09:54:59 -05:00
dependabot[bot]andGitHub 38b609257a chore(deps): bump the python group with 2 updates (#14935) 2025-12-31 12:50:30 -05:00
dependabot[bot]andGitHub 7802c13ab7 chore(deps): bump the python group with 2 updates (#14934) 2025-12-24 10:36:40 -05:00
dependabot[bot]andGitHub b123e43c54 chore(deps): bump the github-actions group with 2 updates (#14933) 2025-12-24 10:36:19 -05:00
dependabot[bot]andGitHub 6682db90fd chore(deps): bump azure-mgmt-network in the python group (#14932) 2025-12-14 20:20:48 -05:00
0d314ea631 Add cooldown and grouping to Dependabot config (#14931)
- Add 7-day cooldown to protect against supply chain attacks
- Group updates by ecosystem to reduce PR noise
- Change schedule from daily to weekly
- Add Docker ecosystem for base image updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 19:58:02 -05:00
dependabot[bot]andGitHub fd0ab40421 chore(deps): bump boto3 from 1.42.7 to 1.42.8 (#14930) 2025-12-12 07:36:33 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
aea4ac477a chore(deps): bump ansible from 12.2.0 to 12.3.0 (#14926)
Bumps [ansible](https://github.com/ansible-community/ansible-build-data) from 12.2.0 to 12.3.0.
- [Changelog](https://github.com/ansible-community/ansible-build-data/blob/main/docs/release-process.md)
- [Commits](https://github.com/ansible-community/ansible-build-data/compare/12.2.0...12.3.0)

---
updated-dependencies:
- dependency-name: ansible
  dependency-version: 12.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-11 11:02:33 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
6e0810c359 chore(deps): bump hcloud from 2.11.1 to 2.12.0 (#14929)
Bumps [hcloud](https://github.com/hetznercloud/hcloud-python) from 2.11.1 to 2.12.0.
- [Release notes](https://github.com/hetznercloud/hcloud-python/releases)
- [Changelog](https://github.com/hetznercloud/hcloud-python/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hetznercloud/hcloud-python/compare/v2.11.1...v2.12.0)

---
updated-dependencies:
- dependency-name: hcloud
  dependency-version: 2.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-11 11:02:22 -05:00
dependabot[bot]andGitHub ce365037e5 chore(deps): bump boto3 from 1.42.6 to 1.42.7 (#14928) 2025-12-11 08:26:52 -05:00
dependabot[bot]andGitHub 1d052f3f80 chore(deps): bump boto3 from 1.42.5 to 1.42.6 (#14927) 2025-12-10 08:41:06 -05:00
dependabot[bot]andGitHub 7b5e326fca chore(deps): bump boto3 from 1.42.4 to 1.42.5 (#14925) 2025-12-09 10:20:27 -05:00
6a9edfabc8 Auto-install Ansible Galaxy collections before deployment (#14924)
After PR #14908 migrated cloud providers to Ansible collections,
users deploying to Linode (and other providers using collections)
get errors because the collections aren't automatically installed.

This adds automatic collection installation to:
- The `algo` script (runs before playbook execution)
- The Dockerfile (baked into the image at build time)

Fixes #14923

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 10:03:19 -05:00
dependabot[bot]andGitHub a7babef704 chore(deps): bump boto3 from 1.42.3 to 1.42.4 (#14922) 2025-12-08 09:03:23 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e75e217061 chore(deps): bump boto3 from 1.42.2 to 1.42.3 (#14921)
Bumps [boto3](https://github.com/boto/boto3) from 1.42.2 to 1.42.3.
- [Release notes](https://github.com/boto/boto3/releases)
- [Commits](https://github.com/boto/boto3/compare/1.42.2...1.42.3)

---
updated-dependencies:
- dependency-name: boto3
  dependency-version: 1.42.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 16:43:32 -05:00
dependabot[bot]andGitHub 8eb7697a83 chore(deps): bump boto3 from 1.42.0 to 1.42.2 (#14920) 2025-12-04 09:07:01 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2d3e97cf88 chore(deps): bump actions/checkout from 6.0.0 to 6.0.1 (#14919)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6...v6.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 10:32:18 -05:00
dependabot[bot]andGitHub 72a13aadef chore(deps): bump boto3 from 1.41.5 to 1.42.0 (#14917) 2025-12-01 08:50:37 -05:00
9268a78028 Add end-to-end VPN connectivity tests using network namespaces (#14914)
* Add end-to-end VPN connectivity tests using network namespaces

Addresses #14912

Current integration tests verify that VPN services start, but don't verify
they actually work. This adds true E2E tests using Linux network namespaces
to simulate a client connecting to the server.

New tests verify:
- WireGuard handshake completes and tunnel is functional
- IPsec/StrongSwan service is configured and listening
- DNS resolution works through VPN (172.16.0.1)
- mobileconfig XML files are valid
- CA certificate chain is correct

Changes:
- Add tests/e2e/test-vpn-connectivity.sh - main E2E test script
- Add tests/e2e/README.md - documentation for running tests
- Update integration-tests.yml to run E2E tests after deployment
- Delete tests/legacy-lxd/ - replaced by new E2E tests
- Update .ansible-lint to remove legacy-lxd from excludes
- Rewrite tests/README.md for clarity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix WireGuard handshake timeout by allowing VPN traffic on veth

The namespace test was timing out because the firewall was blocking
UDP traffic on the veth interface. This adds explicit INPUT rules
to allow WireGuard (51820) and IPsec (500, 4500) traffic.

Also refines the MASQUERADE rule to not apply to bridge-local traffic.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Use -I instead of -A for iptables rules; add debug output

The firewall rules were being appended (-A) after existing DROP rules
and never matched. Changed to -I to insert at beginning of chain.

Also added debug output to show:
- Server WireGuard peers before client connects
- Server port listening status
- iptables INPUT chain on timeout (to verify rules)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Work around deployment bug where WireGuard handlers don't fire

The async role execution in server.yml causes handlers not to fire
properly. This workaround restarts WireGuard if no peers are found,
ensuring the peer configuration is loaded.

Root cause: import_role with async: 300, poll: 0 breaks handler
notification flow. The 'restart wireguard' handler is notified but
never executed because the async context loses track of handlers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add packet capture and rp_filter diagnostics to debug WireGuard handshake

- Disable reverse path filtering on veth interface (can drop packets)
- Add tcpdump capture to see if UDP packets are arriving
- Show host and namespace routing tables
- Add route debugging to error output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add PersistentKeepalive to trigger WireGuard handshake

WireGuard only initiates a handshake when there's outgoing traffic or
a keepalive timer fires. Without PersistentKeepalive, the test was
waiting forever because no traffic was being sent through the tunnel
(Table=off prevents route creation).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clean up verbose debug output from WireGuard tests

Remove routing table and rp_filter debug output that was printed on every
run. Keep the packet capture and detailed error diagnostics that are only
shown on failure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Document configuration assumptions in E2E test README

Add explicit documentation about the hardcoded IP addresses and test user
requirements as suggested in code review. This helps users understand what
default values are expected and why tests might fail on custom configurations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove unused pip cache from integration tests workflow

We use uv for dependency management, not pip, so the pip cache setting
was causing warnings about missing cache folders.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-29 02:16:33 -05:00
11e4dcae22 Reduce friction for bug reporting (#14911)
- Update error message to present troubleshooting and issue filing equally
- Remove dead GitHub Discussions link from troubleshooting page
- Simplify bug report template from 6 sections to 3
- Add config.yml to show troubleshooting link in issue chooser
- Lead CONTRIBUTING.md with "We welcome bug reports!"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 23:45:29 -05:00
56cd17b21a Add AF_UNIX to SystemD RestrictAddressFamilies for future VICI support (#14910)
Preparatory work for issue #14810 (stroke to swanctl migration).

This change adds AF_UNIX to the allowed socket address families in the
StrongSwan SystemD service hardening configuration. This is required for
the VICI socket (/var/run/charon.vici) that swanctl uses to communicate
with the charon daemon.

The change is:
- Backward-compatible (doesn't affect current stroke interface)
- Zero-risk (additive change only)
- Future-proof (enables eventual swanctl migration)

Full migration is deferred until Ubuntu 26.04 approaches, per research
findings documented in #14810.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 18:30:38 -05:00
39bdcc122c Migrate Azure module to azure.azcollection (#14909)
* Migrate Azure module to azure.azcollection

Replace deprecated azure_rm_deployment module with FQCN:
- azure_rm_deployment → azure.azcollection.azure_rm_deployment

Changes:
- Add azure.azcollection (>=3.0.0) to requirements.yml
- Update roles/cloud-azure/tasks/main.yml to use FQCN

No parameter changes needed - the collection module supports all
existing parameters via aliases (deployment_name, resource_group_name,
client_id, secret, tenant, subscription_id).

Closes #14904

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix trailing comma in Azure deployment template

Remove invalid trailing comma in outputs section (line 222).
This was a pre-existing JSON syntax error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 17:50:49 -05:00
42aa65da00 Migrate Linode and DigitalOcean modules to Ansible collections (#14908)
Replace custom modules with official Ansible collection equivalents:
- linode_v4 → linode.cloud.instance
- linode_stackscript_v4 → linode.cloud.stackscript
- digital_ocean_floating_ip → community.digitalocean.digital_ocean_floating_ip

Changes:
- Add linode.cloud and community.digitalocean to requirements.yml
- Update roles/cloud-linode/tasks/main.yml (FQCN + api_token param)
- Update roles/cloud-digitalocean/tasks/main.yml (FQCN)
- Remove 3 entries from .ansible-lint mock_modules
- Delete 3 custom modules (519 lines removed)

Modules kept (no collection equivalent or deferred):
- x25519_pubkey.py - crypto-specific, no equivalent
- scaleway_compute.py - complex state machine, deferred
- lightsail_region_facts.py - no collection equivalent
- gcp_compute_location_info.py - no equivalent, google.cloud deprecated

Closes #14902

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 17:39:11 -05:00
f4e2b8c9e7 Phase 1: Quick wins for code quality and test infrastructure (#14907)
- Replace ignore_errors: true with failed_when: false in 5 files
  (main.yml, users.yml, ubuntu.yml, umount.yml, test-wireguard-real-async.yml)
- Add pytest.ini configuration for test discovery
- Add tests/conftest.py with shared fixtures and mock helpers

The failed_when: false pattern is preferred by ansible-lint as it
explicitly indicates expected failure handling rather than silently
ignoring all errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 17:02:17 -05:00
ff4b853fa8 Refactor CLAUDE.md: add quality gates, reduce redundancy (#14901)
* Refactor CLAUDE.md: add quality gates, reduce redundancy

Analyzed the last 25 PRs to identify patterns where better guidance
could have prevented iteration. Key findings:
- PRs had lint failures caught after submission
- with_items→loop conversions broke list flattening
- Missing input validation and explicit file modes
- Duplicate DNS documentation in 3 places

Changes:
- Add Quality Gates section with mandatory pre-submission checks
- Add Design Requirements checklist (validate inputs, explicit modes)
- Add Ansible Pitfalls section (with_items vs loop, path variables)
- Add Self-Review Checklist
- Consolidate DNS architecture from 3 sections into 1
- Remove redundant sections (Final Notes, User Profiles, duplicate philosophy)
- Condense linting rules into table format

Result: 496 → 307 lines (-38%) while adding actionable new guidance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add Jinja2 native mode guidance (Ansible 12 compatibility)

Analysis of PRs 26-50 revealed that 28% (7 PRs) were fixing Ansible 12
compatibility issues caused by jinja2_native mode being always enabled.

Added guidance for:
- Boolean conditionals requiring actual booleans
- No nested templates in lookup()
- JSON files needing explicit | from_json parsing
- default() not triggering on empty strings (need true param)
- Complex Jinja loops breaking in set_fact

Also added "Undocumented workarounds" to What to Avoid section based on
Scaleway/Vultr upstream module bug patterns.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Ansible version and add OpenSSL explanation

- Update Ansible version from "v9.x" to "v12+" for consistency
  with Jinja2 native mode guidance
- Add one-line explanation to OpenSSL snippet for clarity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Soften language and add troubleshooting cross-reference

- Remove "CRITICAL" and "Critical Gotcha" labels
- Change "90% of routing issues are DNS" to "Many routing issues"
- Add link to docs/troubleshooting.md for comprehensive diagnostics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Clarify 'verify before encoding' philosophy statement

Change ambiguous "Verify before encoding" (encoding could mean data
encoding) to clearer "Test assumptions - run the code before committing"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 16:35:48 -05:00
10de344c5c Fix Docker --cap-drop=all and add multi-arch support (#14900)
* Fix Docker --cap-drop=all and add multi-arch support

Fixes #14899

## Bug Fix: CAP_DROP_ALL Permission Denied

The `chown -R algo:algo /algo` line added in commit 2ab57c3 broke
`--cap-drop=all` functionality. When running as root with all
capabilities dropped, root loses CAP_DAC_OVERRIDE and cannot write
to files owned by other users.

The fix removes the unnecessary chown since:
- Container runs as USER root
- algo-docker.sh writes to /algo/config.cfg at runtime
- /algo must be root-owned for --cap-drop=all to work

## Multi-arch Support

The Docker image was only built for linux/amd64. Added:
- QEMU setup for ARM emulation
- Docker Buildx for multi-platform builds
- platforms: linux/amd64,linux/arm64

This enables native support for Apple Silicon Macs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update Docker actions to latest versions

- setup-qemu-action: v3.6.0 → v3.7.0
- setup-buildx-action: v3.10.0 → v3.11.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 15:21:53 -05:00
a30df0c7eb Add explicit confirmation for local installation (#14897)
Enhance the local installation warning to require typing 'yes' to
proceed, making risks impossible to miss. Users following external
tutorials often don't see the documentation warning until after
their server is already modified.

Changes:
- Replace press-ENTER prompt with explicit 'yes' confirmation
- List specific consequences (firewall, DNS, no uninstall)
- Add local_install_confirmed variable for automation
- Document skip method in deploy-to-ubuntu.md

Closes #14362

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 05:27:29 -05:00