eval to be enough to fail a file on its own. healthScoreWeights is how you express that.
Custom weights are Pro. Set
healthScoreWeights in .irisconfig.json, or configure it visually in Config Studio under Custom Scoring.What everything costs by default
Leave a key out and you get the active preset’s value for it, or the global default below if you haven’t set a preset.The nine security smell keys (
evalUsage, sqlConcatenation, insecureRandom, unsafeRegex, hardcodedLocalhost, disabledTlsVerification, debugFlagsEnabled, weakHashing, openRedirect) were added alongside Security Smells detection. The bareSuppression key was added alongside Inline Suppressions - a valid, reasoned suppression costs nothing, but a bare one is itself a finding. The duplicateCode key was added alongside Duplicate Code Detection.When to customise weights
- Your team ships to a regulated environment and wants secrets to cost twice the default - set
"hardcodedSecret": 18. - Your codebase is a prototype and left-in console logs are not a blocker - set
"consoleLog": 0. - TypeScript safety is the team’s top concern - bump
anyUsageandtsIgnoreabove their preset values. - You want the health score to reflect only the findings you actually act on - zero out the noise.
Security-focused example
Amplify the secrets penalty and make console logs carry more weight for audit-ready code:.irisconfig.json
Softening noise for a legacy codebase
Zero out findings your team has accepted as-is so the health score reflects only what you plan to fix:.irisconfig.json
Interaction with presets
When apresetId is active, the preset’s own weight values are the base. Any key you specify in healthScoreWeights overrides only that key - omitted keys inherit the preset’s value. If you have no preset and no custom weights, the global defaults in the table above apply.