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
5 changes: 5 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 2025-04-12 - Critical: Avoid Hardcoded Credentials in Test Comments

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟑 Minor

Correct the date to match the PR creation date.

The date shows "2025-04-12" but the PR was created on "2026-04-12". This appears to be a typo.

πŸ“… Proposed fix
-## 2025-04-12 - Critical: Avoid Hardcoded Credentials in Test Comments
+## 2026-04-12 - Critical: Avoid Hardcoded Credentials in Test Comments
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 2025-04-12 - Critical: Avoid Hardcoded Credentials in Test Comments
## 2026-04-12 - Critical: Avoid Hardcoded Credentials in Test Comments
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.jules/sentinel.md at line 1, The header line "## 2025-04-12 - Critical:
Avoid Hardcoded Credentials in Test Comments" has the wrong year; update that
date to "2026-04-12" so the sentinel entry matches the PR creation date, i.e.,
replace the string "2025-04-12" in the markdown heading with "2026-04-12".


**Vulnerability:** A hardcoded password ("kanbanery") for an encrypted PDF file was found in a comment within `tests/inference_test.py`.
**Learning:** Comments in test files can inadvertently leak sensitive information, such as passwords used for test resources. Hardcoded secrets, even when intended purely for internal or test use, can pose a risk if the repository is ever compromised or exposed.
**Prevention:** Never include passwords or other sensitive secrets in the codebase, including in code comments or test scripts. If passwords are required for testing, they should be managed via environment variables or a secure secret manager, and test resources should ideally use widely known, non-sensitive credentials (e.g., "password123") if they must be embedded.
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 provided via environment variables or secret manager
output_path = tmp_path / "output.pdf"

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