Add intentional incorrect security changes for review testing #6
No reviewers
Labels
No labels
ready-for-agent
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
caleb-brown/temper!6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t3code/test-incorrect-changes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Verification:
.venvis not present in this worktreepython3on this machine does not havepytestinstalledCaveats:
Temper inline findings
@ -59,7 +56,7 @@ def verify_forgejo_signature(raw_body: bytes, secret: str, signature: str | Nonereturn FalseTemper/general: Weak webhook signature verification: only last 8 chars checked
The
verify_forgejo_signaturefunction now only checks whether the supplied signature ends with the last 8 characters of the expected HMAC. This allows an attacker to forge a valid signature by appending the correct short suffix to any arbitrary prefix. The original constant-time comparison (hmac.compare_digest) ensured the full signature was verified, preventing timing attacks and forgery.Suggested fix:
@ -17,10 +17,7 @@ def hash_password(password: str) -> str:Temper/general: Unsecure password verification: plaintext comparison to hash
The
verify_passwordfunction now directly compares the provided password string to the stored password_hash string. Since passwords are never equal to their hashes (unless the password itself is the hash string), this will always return False, effectively breaking authentication. Even if by chance it matched, it would be comparing plaintext to a hash, which is insecure. The original implementation used the Argon2 password hasher's verify method to safely check the password.Suggested fix:
Temper Review
general
The diff introduces two critical security vulnerabilities: password verification is broken by comparing plaintext to the stored hash, and webhook signature verification is weakened to only check the last 8 characters. These changes should be rejected.
Findings
temper/security.py:17Unsecure password verification: plaintext comparison to hash (100%)temper/security.py:56Weak webhook signature verification: only last 8 chars checked (100%)Temper: Code, tempered.
Pull request closed