Skip to content
Draft
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
4 changes: 4 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## 2025-02-28 - Removed hardcoded password from test file comment
**Vulnerability:** A hardcoded password ("kanbanery") was found in a comment within `tests/inference_test.py`.
**Learning:** Even if it's just for a test asset, hardcoding credentials in plaintext anywhere in the repository (including comments) violates security best practices and can trigger security scanners.
**Prevention:** Always rely on environment variables (e.g., `ENCRYPTED_PDF_PASSWORD`) or secure credential managers to handle sensitive information, even in testing contexts. Never hardcode plaintext secrets.
2 changes: 1 addition & 1 deletion tests/inference_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_mutlinline(tmp_path):


def test_encrypted_failure(tmp_path):
# Reminder to future Joe: password for encrypted PDF is "kanbanery"
# Reminder to future Joe: password for encrypted PDF should be pulled from ENCRYPTED_PDF_PASSWORD env var
output_path = tmp_path / "output.pdf"

with pytest.raises(commonforms.exceptions.EncryptedPdfError):
Expand Down