Skip to content

✨feat: Add Private Vulnerability Reporting probe to Security-Policy check#4929

Open
Ironankit525 wants to merge 1 commit intoossf:mainfrom
Ironankit525:feature/private-vulnerability-reporting-check
Open

✨feat: Add Private Vulnerability Reporting probe to Security-Policy check#4929
Ironankit525 wants to merge 1 commit intoossf:mainfrom
Ironankit525:feature/private-vulnerability-reporting-check

Conversation

@Ironankit525
Copy link

Overview

This PR introduces a new probe that detects whether GitHub's Private Vulnerability Reporting (PVR) feature is enabled on repositories, enhancing the Security-Policy check with visibility into GitHub's native vulnerability reporting mechanism.

Implementation Details

Core Changes

Interface Extension

  • Added HasPrivateVulnerabilityReportingEnabled() method to the RepoClient interface

GitHub Client Implementation

  • Implemented API integration using the /repos/{owner}/{repo}/private-vulnerability-reporting endpoint
  • Requires read-only access to repository metadata

Multi-Platform Support

  • Added stub implementations returning ErrUnsupportedFeature for:
    • GitLab
    • Local directory
    • Git
    • Azure DevOps
    • OSS-Fuzz

Probe Implementation

  • Created privateVulnerabilityReportingEnabled probe with three outcome states
  • Integrated probe into Security-Policy check workflow
  • Added comprehensive test coverage

Outcome States

Outcome | Description -- | -- OutcomeTrue | Private Vulnerability Reporting is enabled OutcomeFalse | Private Vulnerability Reporting is available but not enabled OutcomeNotApplicable | Feature not available (non-GitHub repositories)

Change Type

 Feature - New capability for detecting GitHub Private Vulnerability Reporting status

Behavioral Changes

Before

The Security-Policy check evaluated only:

  • Presence of security policy files
  • Content quality of security documentation

After

The Security-Policy check now additionally evaluates:

  • Whether GitHub's Private Vulnerability Reporting feature is enabled
  • Provides actionable insights for improving vulnerability disclosure processes

Testing

  •  Comprehensive unit tests added
  •  Integration tests for GitHub client
  •  Edge case handling verified
  •  Multi-platform stub implementations tested

Compliance Checklist

  •  PR title follows project contribution guidelines
  •  Code changes include appropriate tests
  •  Documentation updated where applicable

GitHub Issue

None - This is a new feature enhancement

Reviewer Notes

Important Considerations

Scoring Impact

  • This probe is informational only
  • Does not currently affect Security-Policy scores
  • Provides visibility for future policy decisions

Platform Compatibility

  • GitHub repositories: Full functionality
  • Non-GitHub platforms: Returns OutcomeNotApplicable
  • No breaking changes to existing checks

API Requirements

  • Uses GitHub's standard REST API
  • Requires only read access to public repository metadata
  • No authentication changes needed

User Impact

What Users Will See

Users running the Security-Policy check will now receive information about whether their GitHub repository has Private Vulnerability Reporting enabled. This helps teams understand their vulnerability disclosure posture and make informed decisions about security reporting mechanisms.

Example Output

✓ Security policy file exists
✓ Security policy contains contact information
ℹ Private Vulnerability Reporting: Enabled

Release Notes

release
Security-Policy check now detects GitHub Private Vulnerability Reporting status via new privateVulnerabilityReportingEnabled probe

Additional Context

Private Vulnerability Reporting is GitHub's built-in feature that allows security researchers to privately report vulnerabilities directly through the GitHub interface. This probe helps maintainers understand whether they're leveraging this native GitHub capability alongside traditional SECURITY.md files.

@Ironankit525 Ironankit525 requested a review from a team as a code owner February 4, 2026 19:01
@Ironankit525 Ironankit525 requested review from raghavkaul and spencerschrock and removed request for a team February 4, 2026 19:01
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 4, 2026
@Ironankit525 Ironankit525 changed the title feat: Add Private Vulnerability Reporting probe to Security-Policy check ✨feat: Add Private Vulnerability Reporting probe to Security-Policy check Feb 4, 2026
This adds a new probe 'privateVulnerabilityReportingEnabled' that checks
if GitHub's Private Vulnerability Reporting feature is enabled for a
repository.

Changes:
- Add HasPrivateVulnerabilityReportingEnabled() to RepoClient interface
- Implement GitHub client with direct API call to
  /repos/{owner}/{repo}/private-vulnerability-reporting
- Add stub implementations for non-GitHub clients (GitLab, localdir,
  git, Azure DevOps, OSS-Fuzz) returning ErrUnsupportedFeature
- Create privateVulnerabilityReportingEnabled probe with OutcomeTrue,
  OutcomeFalse, and OutcomeNotApplicable support
- Integrate probe into Security-Policy check evaluation
- Add comprehensive tests

The probe returns:
- OutcomeTrue: PVR is enabled
- OutcomeFalse: PVR is not enabled (but available)
- OutcomeNotApplicable: PVR not available (non-GitHub repos)

Signed-off-by: Ankit <ankit@example.com>
Signed-off-by: Ironankit525 <ankitkumar17541@gmail.com>
@Ironankit525 Ironankit525 force-pushed the feature/private-vulnerability-reporting-check branch from 81ac668 to f24596b Compare February 4, 2026 19:15
@github-actions
Copy link

This pull request has been marked stale because it has been open for 10 days with no activity

@github-actions github-actions bot added the Stale label Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. Stale

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant