Keeping Secrets: Lessons Learned From Securing GitHub
summary
A Rails view component uses an unvalidated dynamic call to send that allows zero-argument method dispatch; an attacker enumerates roughly 5,000+ then prunes to 3.6k methods and brute-forces names, finds two methods returning the entire process env, and extracts production secrets including session signing keys. The exposed Marshal-based cookie enables deserialization RCE. Fixes: replace send with guarded calls, restrict env passed to git subprocesses, remove the cookie, rotate secrets, and add scans (Brakeman, RuboCop, Semgrep, CodeQL).
AI-written summary · about
chapters (6)
- 0:00Introduction and speakers
- 3:40Offensive journey discovery
- 13:33GitHub’s defensive response
- 23:41Code scanning and tools
- 24:02Managing secrets in Ruby
- 28:57Q&A and resources
related talks
45mWrongSecrets: We Have a Secret for Everyone!
31mExploiting Leaked Credentials - How python code is leaking millions of secrets
48mHow Source Code is Revealing our Secrets
33mGaining initial access by exploiting leaked credentials
52mGitHub Actions Security: From CI Nightmare to Supply Chain Sentinel
36mGithub Actions Security Landscape
37mThe Evolution of Rails Security
27mGo Auth Urself
