Repository has package vulnerability scanning (Dependabot alerts) enabled
GitHub repositories are assessed for dependency vulnerability scanning enabled via Dependabot alerts, which monitors the dependency graph for known vulnerable packages and versions.
Risk
Without automated scanning, known vulnerable dependencies may persist unnoticed, enabling supply-chain compromise. Exploits in third-party libraries can drive RCE, data theft, or build tampering, undermining confidentiality, integrity, and availability across code and CI/CD.
Run this check with Prowler
Run in Prowler Cloudprowler github --checks repository_dependency_scanning_enabledRecommendation
Enable dependency vulnerability scanning with Dependabot alerts or an equivalent SCA tool across repositories. Apply defense in depth: keep manifests and lockfiles current, triage alerts quickly, use automated security updates with required reviews, and surface results in PR checks and notifications.
Remediation
CLI
gh api --method PUT repos/<OWNER>/<REPO>/vulnerability-alertsTerraform
resource "github_repository" "<example_resource_name>" {
name = "<example_resource_name>"
vulnerability_alerts = true # Enables Dependabot alerts to pass the check
}Other
Check Code
from typing import List
from prowler.lib.check.models import Check, CheckReportGithub
from prowler.providers.github.services.repository.repository_client import (
repository_client,
)
class repository_dependency_scanning_enabled(Check):
"""Check if package vulnerability scanning (Dependabot alerts) is enabled for dependencies in the repository
This class verifies whether each repository has package vulnerability scanning enabled.
"""
def execute(self) -> List[CheckReportGithub]:
"""Execute the Github Repository Package Vulnerabilities Scanner check
Iterates over all repositories and checks if package vulnerability scanning is enabled.
Returns:
List[CheckReportGithub]: A list of reports for each repository
"""
findings = []
for repo in repository_client.repositories.values():
if repo.dependabot_alerts_enabled is not None:
report = CheckReportGithub(metadata=self.metadata(), resource=repo)
if repo.dependabot_alerts_enabled:
report.status = "PASS"
report.status_extended = f"Repository {repo.name} has package vulnerability scanning (Dependabot alerts) enabled."
else:
report.status = "FAIL"
report.status_extended = f"Repository {repo.name} does not have package vulnerability scanning (Dependabot alerts) enabled."
findings.append(report)
return findings