Skip to content

fix(grading): committed .env / hardcoded connection string is now a hard-fail blocker#2

Open
lassebenni wants to merge 1 commit into
mainfrom
fix/secrets-blocker-grading
Open

fix(grading): committed .env / hardcoded connection string is now a hard-fail blocker#2
lassebenni wants to merge 1 commit into
mainfrom
fix/secrets-blocker-grading

Conversation

@lassebenni

Copy link
Copy Markdown
Collaborator

Summary

  • A student who committed week11-streamlit/.env or hardcoded a Postgres connection string in app.py previously only lost 5/15 Level 2 points and could still pass overall.
  • Adds a blocker() helper to grader_lib.sh (same pattern as week 10's fix): prints like fail() but forces write_score() to report pass=false no matter the point total.
  • Both secrets checks now call blocker() and tell the student to rotate the password since it was pushed to GitHub.

Test plan

  • bash -n .hyf/test.sh / bash -n .hyf/grader_lib.sh
  • Confirm a real PR run in CI still posts the comment and fails the "Fail if tests failed" step.

🤖 Generated with Claude Code

A committed week11-streamlit/.env or a hardcoded Postgres connection
string in app.py previously only cost 5 points inside Level 2, so a
student could still pass overall with a leaked password. Add a
blocker() helper to grader_lib.sh that forces write_score() to report
pass=false regardless of score, and wire it into both secrets checks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant