Skip to content

feat(github): add repository and organization scoping support #8329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

andoniaf
Copy link
Member

@andoniaf andoniaf commented Jul 18, 2025

Context

Fix #8111 - Addresses the need for GitHub repository and organization scoping support to enable targeted security audits instead of scanning all accessible resources.

Description

This PR implements comprehensive GitHub repository and organization scoping functionality for the Prowler GitHub provider:

Core Changes:

  • Added --repository and --organization CLI arguments for targeted scanning
  • Modified GitHub provider to accept and process scoping parameters

Key Features:

  • Repository scoping: --repository owner1/repo1 owner2/repo2
  • Organization scoping: --organization org1 org2
  • Combined scoping: Use both parameters together

Checklist

  • Are there new checks included in this PR? No
  • Review if the code is being covered by tests.
  • Review if code is being documented following this specification
  • Review if backport is needed.
  • Review if is needed to change the Readme.md
  • Ensure new entries are added to CHANGELOG.md

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required
  • Ensure new entries are added to API CHANGELOG.md

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@andoniaf andoniaf requested review from a team as code owners July 18, 2025 15:11
Copy link
Contributor

github-actions bot commented Jul 18, 2025

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

✅ All necessary CHANGELOG.md files have been updated. Great job! 🎉

@andoniaf andoniaf marked this pull request as draft July 18, 2025 15:14
@andoniaf andoniaf marked this pull request as ready for review July 18, 2025 15:16
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

❌ Patch coverage is 68.22430% with 68 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.03%. Comparing base (d4e66c4) to head (b6cfae8).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #8329       +/-   ##
===========================================
- Coverage   88.07%   76.03%   -12.05%     
===========================================
  Files         898       98      -800     
  Lines       27804     5566    -22238     
===========================================
- Hits        24488     4232    -20256     
+ Misses       3316     1334     -1982     
Flag Coverage Δ
prowler 76.03% <68.22%> (-12.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler 76.03% <68.22%> (-12.05%) ⬇️
api ∅ <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andoniaf andoniaf force-pushed the PRWLR-7664-add-git-hub-repository-and-organization-scoping-support branch from 227a963 to 883b7e7 Compare July 19, 2025 09:02
@andoniaf andoniaf requested a review from a team as a code owner July 19, 2025 09:02
@github-actions github-actions bot added github_actions Pull requests that update GitHub Actions code component/api labels Jul 19, 2025
@rudimk
Copy link

rudimk commented Jul 24, 2025

This is awesome! Just curious - do we have a timeline on when this will be out?

@andoniaf
Copy link
Member Author

This is awesome! Just curious - do we have a timeline on when this will be out?

Thanks @rudimk! 🫶 It'll be in master next week. For the 5.10 version, I don't have an official date yet, but I'd say no more than two weeks. 🦾

@andoniaf andoniaf requested a review from MrCloudSec July 28, 2025 13:28
@MrCloudSec MrCloudSec removed component/api github_actions Pull requests that update GitHub Actions code labels Jul 28, 2025
Copy link
Member

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@MrCloudSec MrCloudSec merged commit 8dc4bd0 into master Jul 28, 2025
13 of 15 checks passed
@MrCloudSec MrCloudSec deleted the PRWLR-7664-add-git-hub-repository-and-organization-scoping-support branch July 28, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for scoped GitHub audits
5 participants