Skip to content

fix(grading): committed profiles.yml is now a hard-fail blocker#9

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

fix(grading): committed profiles.yml is now a hard-fail blocker#9
lassebenni wants to merge 1 commit into
mainfrom
fix/secrets-blocker-grading

Conversation

@lassebenni

Copy link
Copy Markdown
Collaborator

Summary

  • A student who committed profiles.yml (with a real DB password) previously only lost 5/15 Level 2 points and could still pass overall at 60/100.
  • Adds a blocker() helper to grader_lib.sh: prints like fail() but also forces write_score() to report pass=false no matter the point total.
  • The profiles.yml committed check now calls blocker() instead of fail(), and the message now also tells 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
  • Manually created a stray profiles.yml, ran .hyf/test.sh, confirmed score.json reports "pass": false even though the numeric score (43) would otherwise still be below/near the passing threshold — verified the blocker overrides pass regardless of score.
  • Confirm a real PR run in CI still posts the comment and fails the "Fail if tests failed" step.

🤖 Generated with Claude Code

Previously a committed profiles.yml only cost 5 points inside Level 2,
so a student could still pass at 60/100 with a leaked Postgres password
in the repo. Add a blocker() helper to grader_lib.sh that forces
write_score() to report pass=false regardless of the earned score, and
wire it into the profiles.yml check.

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