Describe the need
GitHub allows enabling Dependabot malware alerts on a per-repository basis (Settings > Advanced Security > Dependabot malware alerts). This setting controls whether Dependabot flags dependencies that contain known malware, separate from general vulnerability alerts.
Currently there is no Terraform resource or attribute to manage this setting. It can only be toggled through the GitHub UI.
A new resource (similar to github_repository_dependabot_security_updates) would allow teams to enforce this setting via IaC:
resource "github_repository_dependabot_malware_alerts" "example" {
repository = github_repository.my_repo.name
enabled = true
}
Why this matters
- Organizations managing security settings as Infrastructure as Code have no way to enforce or detect drift on this setting
- The GitHub REST API does not expose a per-repository endpoint to read or write malware alert status, so even workarounds using
null_resource + API calls are not possible
- As supply chain attacks targeting dependency managers become more common, malware detection is increasingly important to manage at scale
Workaround
None. The setting can only be managed through the GitHub UI. There is no REST API endpoint to read or write it at the repository level.
SDK Version
N/A
API Version
N/A
Relevant log output
Code of Conduct
Describe the need
GitHub allows enabling Dependabot malware alerts on a per-repository basis (Settings > Advanced Security > Dependabot malware alerts). This setting controls whether Dependabot flags dependencies that contain known malware, separate from general vulnerability alerts.
Currently there is no Terraform resource or attribute to manage this setting. It can only be toggled through the GitHub UI.
A new resource (similar to
github_repository_dependabot_security_updates) would allow teams to enforce this setting via IaC:Why this matters
null_resource+ API calls are not possibleWorkaround
None. The setting can only be managed through the GitHub UI. There is no REST API endpoint to read or write it at the repository level.
SDK Version
N/A
API Version
N/A
Relevant log output
Code of Conduct