Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
91e11ac
🐛 fix(core): make fetch tags non-fatal in generate changelog hook
JuanVilla424 May 25, 2026
fae2cfd
🐛 fix(core): use docker compose v2 plugin instead of deprecated docke…
JuanVilla424 May 30, 2026
177206d
✨ feat(core): add validate container names script for cloudformation …
JuanVilla424 May 30, 2026
e671779
🔖 Bump version: 1.1.19 → 1.1.20
JuanVilla424 May 30, 2026
3c09a3c
🐛 fix(deps): update pytest requirement from ^8.3.1 to ^9.0.3 (#112)
dependabot[bot] May 30, 2026
db1fa0a
🐛 fix(deps): update bump2version requirement from ^1.0.0 to ^1.0.1 (#…
dependabot[bot] May 30, 2026
4d50bee
🐛 fix(deps): update requests requirement from ^2.32.3 to ^2.34.2 (#114)
dependabot[bot] May 30, 2026
25b4aa3
🐛 fix(deps): update setuptools requirement from ^82.0.0 to ^82.0.1 (#…
dependabot[bot] May 30, 2026
a6a31f8
🐛 fix(core): handle existing tag gracefully in version-controller wor…
JuanVilla424 May 30, 2026
ed57c00
🐛 fix(core): resolve key pair year rollover, formatter hook bugs and …
JuanVilla424 Jun 11, 2026
29d00b1
🐛 fix(core): derive changelog versions from bump commits to close gap…
JuanVilla424 Jun 15, 2026
aa4e883
Bump version: 1.1.20 → 1.1.21
JuanVilla424 Jun 15, 2026
94e1efa
🐛 fix(core): restage tracked changes and retry amend in version bump …
JuanVilla424 Jun 15, 2026
fe27bf4
🐛 fix(deps): split runtime and dev requirements and resolve requests …
JuanVilla424 Jun 15, 2026
8a29ff7
🔧 chore(core): merge test into dev to resolve 1.1.21 promotion conflicts
JuanVilla424 Jun 15, 2026
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.20
current_version = 1.1.21
commit = True
tag = False

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
run: |
zip -r "${REPO_NAME}-${GITHUB_REF_NAME}.zip" \
{INSTALL,SECURITY,README,ICONS,CONTRIBUTING,CODE_OF_CONDUCT}.md \
requirements.txt .github scripts *adm* smtp-relay elastalert \
requirements.txt requirements.dev.txt .github scripts *adm* smtp-relay elastalert \
pyproject.toml
env:
REPO_NAME: ${{ env.REPO_NAME }}
Expand Down
3 changes: 1 addition & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fail-under=8
#from-stdin=

# Files or directories to be skipped. They should be base names, not paths.
ignore=venv,node_modules,scripts
ignore=venv,.venv,env,node_modules,scripts,.git,__pycache__,build,dist,.eggs,.mypy_cache,.pytest_cache,.ruff_cache,.tox,htmlcov,coverage,.next

# Add files or directories matching the regular expressions patterns to the
# ignore-list. The regex matches against paths and can be in Posix or Windows
Expand Down Expand Up @@ -106,7 +106,6 @@ source-roots=

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
Expand Down
103 changes: 81 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
## [1.1.19] - 2026-03-03
## [1.1.21] - 2026-06-15

### Bug Fixes

- **core**: derive changelog versions from bump commits to close gaps (`patch candidate`)
- **core**: resolve key pair year rollover, formatter hook bugs and enforce 96 coverage gate
- **core**: handle existing tag gracefully in version-controller workflow
- **deps**: update setuptools requirement from ^82.0.0 to ^82.0.1 (#115)
- **deps**: update requests requirement from ^2.32.3 to ^2.34.2 (#114)
- **deps**: update bump2version requirement from ^1.0.0 to ^1.0.1 (#113)
- **deps**: update pytest requirement from ^8.3.1 to ^9.0.3 (#112)

## [1.1.20] - 2026-05-30

### Features

- **core**: add inline release creation to version controller (`patch candidate`)
- **core**: add validate container names script for cloudformation templates (`patch candidate`)

### Bug Fixes

- **core**: use docker compose v2 plugin instead of deprecated docker-compose v1
- **core**: make fetch tags non-fatal in generate changelog hook

## [1.1.19] - 2026-03-03

### Bug Fixes

- **core**: add pull-requests write permission to version controller (`patch candidate`)

### Documentation
## [1.1.18] - 2026-03-03

- **core**: update changelog
### Features

- **core**: add inline release creation to version controller (`patch candidate`)

## [1.1.17] - 2026-03-03

### Bug Fixes

- **core**: use access token for tag push to trigger release workflow (`patch candidate`)

### Documentation

- **core**: update changelog

## [1.1.16] - 2026-03-03

### Features

- **core**: add inline release notes and update cicd workflows (`patch candidate`)

### Documentation

- **core**: update changelog

## [1.1.15] - 2026-03-02
## [1.1.15] - 2026-03-03

### Bug Fixes

Expand Down Expand Up @@ -88,6 +101,8 @@

- **core**: bump year version (`patch candidate`)

## [1.1.11] - 2025-01-07

### Chores

- **core**: bump year version (`patch candidate`)
Expand All @@ -107,6 +122,9 @@

- deps: update pytest-cov requirement from ^5.0.0 to ^6.0.0 (#45)
- deps: update pytest-cov requirement from ^5.0.0 to ^6.0.0
- Update CNAME
- Update CNAME
- Create CNAME

## [1.1.9] - 2024-10-29

Expand Down Expand Up @@ -151,20 +169,37 @@

## [1.1.2] - 2024-10-27

### Features
### Bug Fixes

- **core**: fix commit icons and commit regex validation (`patch candidate`)
- **core**: added commit icons and commit regex validation (`minor candidate`)

### Bug Fixes
## [1.1.1] - 2024-10-27

### Features

- **core**: fix commit icons and commit regex validation (`patch candidate`)

## [1.1.0] - 2024-10-27

### Features

- **core**: added commit icons and commit regex validation (`minor candidate`)

### Chores

- **core**: test icons
- **core**: test icons

## [1.0.19] - 2024-10-27

### Chores

- **core**: test icons (`patch candidate`)

## [1.0.18] - 2024-10-27

### Chores

- **core**: test icons (`patch candidate`)
- **core**: test icons
- **core**: test icons flow
Expand All @@ -174,6 +209,11 @@
### Chores

- **core**: test icons flow (`patch candidate`)

## [1.0.14] - 2024-10-27

### Chores

- **core**: test version controller (`patch candidate`)

## [1.0.13] - 2024-10-27
Expand Down Expand Up @@ -204,6 +244,11 @@
### Chores

- **style**: fixed bump year flow (`patch candidate`)

## [1.0.9] - 2024-10-26

### Chores

- **style**: fixed bump year flow (`patch candidate`)
- **core**: added crypto controller

Expand All @@ -213,26 +258,40 @@

- **core**: fixed confs (`patch candidate`)

### Other Changes

- Update CNAME
- Update CNAME
- Create CNAME

## [1.0.7] - 2024-10-23

### Styles

- **core**: fixed confs (`patch candidate`)

## [1.0.6] - 2024-10-23

### Styles

- **core**: fixed confs (`patch candidate`)

## [1.0.5] - 2024-10-23

### Styles

- **core**: fixed confs (`patch candidate`)

## [1.0.4] - 2024-10-23

### Styles

- **core**: fixed confs (`patch candidate`)

## [1.0.3] - 2024-10-23

### Styles

- **core**: added readme file (`patch candidate`)

## [1.0.2] - 2024-10-23

### Styles

- **core**: added readme file (`patch candidate`)
- **core**: added readme file

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Setting up a Python virtual environment ensures that dependencies are managed ef
4. **Install Dependencies**

```bash
pip install -r requirements.txt
pip install -r requirements.txt -r requirements.dev.txt
pip install poetry
poetry lock
poetry install
Expand Down
38 changes: 22 additions & 16 deletions commit_msg_version_bump/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,26 +233,32 @@ def amend_commit(new_commit_msg: str) -> None:
"""
Amends the current commit with the new commit message.

Pre-commit hooks (e.g. generate-changelog, prettier) may modify tracked files such
as CHANGELOG.md while the amend runs, which aborts the amend. We re-stage those
tracked changes with ``git add -u`` and retry so they are folded into the bump
commit. ``--no-verify``/``--force`` are never used (global rule): the hooks are
idempotent, so the retry converges once their changes are staged.

Args:
new_commit_msg (str): The new commit message.

Raises:
subprocess.CalledProcessError: If git amend fails.
"""
try:
# Amend the commit with the new commit message
subprocess.run(
["git", "commit", "--amend", "-m", new_commit_msg],
check=True,
encoding="utf-8",
)
logger.info("Successfully amended the commit with the new version bump.")
logger.info(
"Please perform a push using 'git push' to update the remote repository. Avoid using --force"
amend_cmd = ["git", "commit", "--amend", "-m", new_commit_msg]
max_attempts = 3
for attempt in range(1, max_attempts + 1):
result = subprocess.run(amend_cmd, encoding="utf-8")
if result.returncode == 0:
logger.info("Successfully amended the commit with the new version bump.")
logger.info(
"Please perform a push using 'git push' to update the remote repository. Avoid using --force"
)
return
logger.warning(
f"Amend attempt {attempt} aborted by pre-commit hooks modifying files; "
"re-staging tracked changes and retrying."
)
except subprocess.CalledProcessError as e:
logger.error(f"Failed to amend the commit: {e}")
sys.exit(1)
subprocess.run(["git", "add", "-u"], check=True, encoding="utf-8")
logger.error(f"Failed to amend the commit after {max_attempts} attempts.")
sys.exit(1)


def main() -> None:
Expand Down
18 changes: 16 additions & 2 deletions crypto_controller/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import warnings
import smtplib
from email.mime.text import MIMEText
import json # Added import for JSON handling
import json
import re

from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa, padding
Expand Down Expand Up @@ -536,6 +537,19 @@ def get_status(self) -> None:
print("Failed to retrieve status. Check logs for more details.")


def _resolve_key_pair_name(cert_location: str) -> str:
"""Returns the active key pair name whose year range contains the current year."""
current_year = datetime.now().year
if os.path.isdir(cert_location):
for fname in os.listdir(cert_location):
match = re.match(r"^Crypto-Key-Pair-(\d{4})-(\d{4})\.kp$", fname)
if match:
start, end = int(match.group(1)), int(match.group(2))
if start <= current_year <= end:
return fname[:-3]
return f"Crypto-Key-Pair-{current_year}-{current_year + int(CERT_EXPIRATION_YEARS)}"


def parse_arguments() -> argparse.Namespace:
"""
Parses command-line arguments.
Expand All @@ -561,7 +575,7 @@ def parse_arguments() -> argparse.Namespace:
)
parser.add_argument(
"--key-pair-name",
default=f"Crypto-Key-Pair-{datetime.now().year}",
default=_resolve_key_pair_name(os.path.join(os.getcwd(), "certs")),
help="Name of the key pair. Defaults to 'Crypto-Key-Pair-<YEAR>'.",
)
parser.add_argument(
Expand Down
1 change: 1 addition & 0 deletions crypto_controller/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ python-dotenv>=0.19.0
wheel>=0.36.2
pytest>=7.0.0
pytest-cov>=4.0.0
pytest-mock>=3.11.0
3 changes: 1 addition & 2 deletions format_yaml/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ def format_yaml_file(file_path):

new_lines.append(line)

formatted_content = "\n".join(lines) + "\n"
formatted_content = "\n".join(new_lines) + "\n"

with open(file_path, "w", newline="\n", encoding="utf-8") as f:
f.write(formatted_content)

print(f"[FORMAT] Formatted {file_path} with LF line endings.")
sys.exit(0)


def main():
Expand Down
13 changes: 4 additions & 9 deletions format_yml/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,16 @@ def format_yml_file(file_path):

while len(line) > 120:
split_pos = line.rfind(" ", 0, 120)
if split_pos != -1:
if split_pos > current_indent:
split_line1 = line[:split_pos] + " \\"
split_line2 = " " * current_indent + " " + line[split_pos + 1 :].lstrip()
line = " " * current_indent + " " + line[split_pos + 1 :].lstrip()
new_lines.append(split_line1)
new_lines.append(split_line2)
print(f"[FORMAT] Split long line at line {i} in {file_path}.")
continue
if not split_pos != -1:
else:
split_line1 = line[:120] + " \\"
split_line2 = " " * current_indent + " " + line[120 + 1 :].lstrip()
line = " " * current_indent + " " + line[120:].lstrip()
new_lines.append(split_line1)
new_lines.append(split_line2)
print(f"[FORMAT] Force split long line at line {i} in {file_path}.")
continue

new_lines.append(line)

Expand All @@ -61,7 +57,6 @@ def format_yml_file(file_path):
f.write(formatted_content)

print(f"[FORMAT] Formatted {file_path} with LF line endings.")
sys.exit(0)


def main():
Expand Down
Loading
Loading