mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-28 14:37:01 -07:00
modules/recon/rails-database-yml-exposure.yaml flags an exposed config/database.yml on the adapter key paired with a credential key, then extracts the database name. requiring a credential key keeps a credential free sqlite config from being reported as a high severity leak. modules/recon/rails-secrets-yml-exposure.yaml flags an exposed config/secrets.yml on the secret_key_base key and extracts the secret, the value an attacker needs to forge rails sessions. modules/recon/rails-master-key-exposure.yaml flags an exposed master key, the 32 hex value that decrypts the encrypted credentials store. the matcher anchors the hex to the whole body so a longer digest such as a sha256 served at the same path does not match, and the same probe covers config/credentials. internal/modules/rails_secret_exposure_test.go drives the three modules end to end through ExecuteHTTPModule and asserts the leak alongside the near misses a strict review wants pinned: a credential free sqlite config, a longer hex digest, a hex value away from the body start, an html page naming the markers, a config without the markers and a 404, none of which may match. verify: go test ./internal/modules, each matcher, guard, anchor and extractor proven to bite (break -> red, restore -> green).