Skip to content

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

Merged
lassebenni merged 1 commit into
mainfrom
fix/secrets-blocker-grading
Jul 10, 2026
Merged

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

Conversation

@lassebenni

Copy link
Copy Markdown
Contributor

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.
  • Ported from the same fix in the canonical template: fix(grading): committed profiles.yml is now a hard-fail blocker HackYourFuture/data-assignment-week-10#9

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 (score 43) even though it's independent of the passing-score comparison — 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>
@lassebenni lassebenni merged commit e3b01e4 into main Jul 10, 2026
1 of 2 checks passed
@lassebenni lassebenni deleted the fix/secrets-blocker-grading branch July 10, 2026 09:31
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