Skip to content

Commit

Permalink
feat(config/presets): add security-only preset (#28320)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
  • Loading branch information
shahradelahi and secustor committed Apr 11, 2024
1 parent a1c8a93 commit da6056c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/usage/configuration-options.md
Expand Up @@ -4004,3 +4004,7 @@ To disable the vulnerability alerts feature, set `enabled=false` in a `vulnerabi
}
}
```

<!-- prettier-ignore -->
!!! note
If you want to raise only vulnerability fix PRs, you may use the `security:only-security-updates` preset.
15 changes: 15 additions & 0 deletions lib/config/presets/internal/security.ts
Expand Up @@ -21,4 +21,19 @@ export const presets: Record<string, Preset> = {
},
],
},
'only-security-updates': {
description:
'Only update dependencies if vulnerabilities have been detected.',
extends: ['config:recommended'],
packageRules: [
{
enabled: false,
matchPackageNames: ['*'],
},
],
vulnerabilityAlerts: {
enabled: true,
},
osvVulnerabilityAlerts: true,
},
};

0 comments on commit da6056c

Please sign in to comment.