Epic: Security & Safety Hardening #362

Open
opened 2026-02-22 23:41:38 +00:00 by freemo · 8 comments
Owner

Background

Covers security audit findings: template rendering hardening, explicit exception handling, async resource leak closure, and read-only action enforcement.

Expected Behavior

Security audit findings are resolved: template rendering is hardened against injection, exception handling is explicit and safe, async resource leaks are closed, and read-only action enforcement prevents unintended mutations.

Child Issues

Definition of Done

This Epic is complete when all child issues are closed and merged. Security audit findings resolved.

## Background Covers security audit findings: template rendering hardening, explicit exception handling, async resource leak closure, and read-only action enforcement. ## Expected Behavior Security audit findings are resolved: template rendering is hardened against injection, exception handling is explicit and safe, async resource leaks are closed, and read-only action enforcement prevents unintended mutations. ## Child Issues - #319 - #320 - #321 - #322 - #405 ## Definition of Done This Epic is complete when all child issues are closed and merged. Security audit findings resolved.
freemo added this to the v3.3.0 milestone 2026-02-22 23:41:38 +00:00
Author
Owner

Implementation Notes — Advanced Security Scans Alignment

2026-02-13: Task Q0-adv-security In Progress - Align Security Scans with Nox

  • Added Semgrep as Step 3 in security_scan session (between Bandit and Vulture).
  • Changed semgrep hook from wrapper script to direct invocation.
  • Updated quality-automation docs with revised thresholds (85->97%).

(Migrated from docs/implementation-notes.md)

## Implementation Notes — Advanced Security Scans Alignment **2026-02-13**: Task Q0-adv-security In Progress - Align Security Scans with Nox - Added Semgrep as Step 3 in `security_scan` session (between Bandit and Vulture). - Changed semgrep hook from wrapper script to direct invocation. - Updated quality-automation docs with revised thresholds (85->97%). *(Migrated from `docs/implementation-notes.md`)*
freemo self-assigned this 2026-02-24 03:37:59 +00:00
Author
Owner

PM Status (Day 31):

Epic #362 (Security & Safety Hardening) status review:

M4 milestone (v3.3.0): This epic is assigned to M4. M4 is now feature-complete. Safety profile enforcement (#345) merged Day 23. Secret masking (#573) has PR #656 submitted by @CoreRasurae (merge conflict, no reviews).

Child issue status: Please verify which child issues under this epic are still open vs closed. If all security-related child features are merged, this epic may be ready for closure.

@freemo — can you confirm whether the remaining child issues under this epic are resolved? If so, we can close this epic and unblock M4 milestone closure.

**PM Status (Day 31)**: Epic #362 (Security & Safety Hardening) status review: **M4 milestone (v3.3.0)**: This epic is assigned to M4. M4 is now feature-complete. Safety profile enforcement (#345) merged Day 23. Secret masking (#573) has PR #656 submitted by @CoreRasurae (merge conflict, no reviews). **Child issue status**: Please verify which child issues under this epic are still open vs closed. If all security-related child features are merged, this epic may be ready for closure. @freemo — can you confirm whether the remaining child issues under this epic are resolved? If so, we can close this epic and unblock M4 milestone closure.
Author
Owner

New child issue added: #1273BUG: [error-handling] Silent exception swallowing in MigrationRunner._find_alembic_ini

This issue covers the silent except Exception: pass in _find_alembic_ini that suppresses import errors without logging them. The fix replaces pass with a _logger.debug(...) call, consistent with the explicit exception handling theme of this Epic.

Issue #1273 blocks this Epic.

New child issue added: #1273 — **BUG: [error-handling] Silent exception swallowing in `MigrationRunner._find_alembic_ini`** This issue covers the silent `except Exception: pass` in `_find_alembic_ini` that suppresses import errors without logging them. The fix replaces `pass` with a `_logger.debug(...)` call, consistent with the explicit exception handling theme of this Epic. Issue #1273 blocks this Epic.
Author
Owner

New child issue added to this Epic: #1275BUG-HUNT: [spec-alignment] Default value of effective_profile_snapshot violates spec intent

This issue covers the Plan domain model's effective_profile_snapshot field defaulting to "{}", which violates the specification's auditability and reproducibility requirements. It is a low-priority spec-alignment bug that fits within the Security & Safety Hardening scope.

New child issue added to this Epic: #1275 — **BUG-HUNT: [spec-alignment] Default value of `effective_profile_snapshot` violates spec intent** This issue covers the `Plan` domain model's `effective_profile_snapshot` field defaulting to `"{}"`, which violates the specification's auditability and reproducibility requirements. It is a low-priority spec-alignment bug that fits within the Security & Safety Hardening scope.
Author
Owner

New child issue added: #1283 — Fix silent exception swallowing in LegacyDataMigrator.migrate_project_data

This issue addresses the explicit exception handling audit finding (silent swallowing of json.JSONDecodeError and OSError in the legacy data migration path). It depends on #1283.

New child issue added: #1283 — Fix silent exception swallowing in `LegacyDataMigrator.migrate_project_data` This issue addresses the explicit exception handling audit finding (silent swallowing of `json.JSONDecodeError` and `OSError` in the legacy data migration path). It depends on #1283.
Author
Owner

Child issue added: #1288 — BUG-HUNT: [spec-alignment] Default database location deviates from specification

This issue fixes the database_url default in Settings to use ~/.cleveragents/cleveragents.db as required by the specification, rather than the current working directory.

Child issue added: #1288 — BUG-HUNT: [spec-alignment] Default database location deviates from specification This issue fixes the `database_url` default in `Settings` to use `~/.cleveragents/cleveragents.db` as required by the specification, rather than the current working directory.
Author
Owner

Child issue #1289 (BUG-HUNT: [spec-alignment] Database schema documentation in specification is outdated) has been created and blocks this Epic.

Child issue #1289 (BUG-HUNT: [spec-alignment] Database schema documentation in specification is outdated) has been created and blocks this Epic.
Author
Owner

New child issue added to this Epic: #1291fix: [error-handling] Propagate exception when sandbox backup restore fails during commit

This issue addresses the swallowed exception in CopyOnWriteSandbox.commit and OverlaySandbox.commit when safe_restore fails during rollback. It is a direct child of this Epic (Security & Safety Hardening) as it falls under the "explicit exception handling" audit finding.

Dependency: #1291 is independent of the current open work in this Epic and does not block any existing child issues.

New child issue added to this Epic: #1291 — **fix: [error-handling] Propagate exception when sandbox backup restore fails during commit** This issue addresses the swallowed exception in `CopyOnWriteSandbox.commit` and `OverlaySandbox.commit` when `safe_restore` fails during rollback. It is a direct child of this Epic (Security & Safety Hardening) as it falls under the "explicit exception handling" audit finding. **Dependency**: #1291 is independent of the current open work in this Epic and does not block any existing child issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks Depends on
Reference
cleveragents/cleveragents-core#362
No description provided.