diff options
| author | James O'Doherty <james@theodohertyfamily.com> | 2026-05-22 10:46:02 -0400 |
|---|---|---|
| committer | James O'Doherty <james@theodohertyfamily.com> | 2026-05-22 10:46:02 -0400 |
| commit | 9131b0004e7c640cc028179e1d049a4c62210d94 (patch) | |
| tree | 7efb5612b61240105851cb5d8ac8f05263644db4 /AGENTS.md | |
| parent | 401683a6b11e5a7810c949147a12f2c4bbfba48a (diff) | |
Security hardening: prevent shell injection and null-byte crashes, implement 8-bit clean argument fuzzing and portable E2E binary discovery
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -45,6 +45,7 @@ To maintain a high-velocity development cycle without sacrificing correctness, w - **Code Stubs**: Any unimplemented logic path must be explicitly marked with a `// TODO` comment and return a descriptive error (e.g., `fmt.Errorf("feature X not yet implemented")`). - **Test Stubs**: Any test that is planned but not yet implementable must use `t.Skip("not implemented")` and include a comment describing the specific scenario the test is intended to verify. - **Hermetic Configuration**: Tests involving profiles, settings, or filesystem state must not touch the actual user home directory. Use the `ConfigDir` injection pattern in the `App` struct combined with `t.TempDir()` to create isolated, temporary test environments. +- **Path Portability**: NEVER hardcode absolute paths (e.g., `/home/user/...`) in the source code or test suites. Always use relative paths, `os.Getwd()`, or environment-aware discovery to locate binaries and configuration files. - **Performance & Reliability**: - **Parallelism**: Use `t.Parallel()` in integration and E2E tests. Use `t.TempDir()` to ensure resource isolation. - **Granular Timeouts**: All system calls, network operations, and external command executions must be wrapped in a `context.WithTimeout` (typically 2-5 seconds) to prevent hanging tests. |
