Skip to content

Commit 0c6b9b1

Browse files
committed
Merge branch 'master' of github.com:prowler-cloud/prowler into k8s-dedup-rbac-findings-subject
2 parents 4910fb3 + 8db3a89 commit 0c6b9b1

1,511 files changed

Lines changed: 151573 additions & 23147 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/wt.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Prowler worktree automation for worktrunk (wt CLI).
2+
# Runs automatically on `wt switch --create`.
3+
4+
# Block 1: setup + copy gitignored env files (.envrc, ui/.env.local)
5+
# from the primary worktree — patterns selected via .worktreeinclude.
6+
[[pre-start]]
7+
skills = "./skills/setup.sh --claude"
8+
python = "poetry env use python3.12"
9+
envs = "wt step copy-ignored"
10+
11+
# Block 2: install Python deps (requires `poetry env use` from block 1).
12+
[[pre-start]]
13+
deps = "poetry install --with dev"
14+
15+
# Block 3: reminder — last visible output before `wt switch` returns.
16+
# Hooks can't mutate the parent shell, so venv activation is manual.
17+
[[pre-start]]
18+
reminder = "echo '>> Reminder: activate the venv in this shell with: eval $(poetry env activate)'"
19+
20+
# Background: pnpm install runs while you start working.
21+
# Tail logs via `wt config state logs`.
22+
[post-start]
23+
ui = "cd ui && pnpm install"

.env

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ TASK_RETRY_ATTEMPTS=5
7878

7979
# Valkey settings
8080
# If running Valkey and celery on host, use localhost, else use 'valkey'
81+
VALKEY_SCHEME=redis
82+
VALKEY_USERNAME=
83+
VALKEY_PASSWORD=
8184
VALKEY_HOST=valkey
8285
VALKEY_PORT=6379
8386
VALKEY_DB=0
@@ -142,7 +145,7 @@ SENTRY_RELEASE=local
142145
NEXT_PUBLIC_SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT}
143146

144147
#### Prowler release version ####
145-
NEXT_PUBLIC_PROWLER_RELEASE_VERSION=v5.16.0
148+
NEXT_PUBLIC_PROWLER_RELEASE_VERSION=v5.26.0
146149

147150
# Social login credentials
148151
SOCIAL_GOOGLE_OAUTH_CALLBACK_URL="${AUTH_URL}/api/auth/callback/google"

.github/CODEOWNERS

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# SDK
2-
/* @prowler-cloud/sdk
3-
/prowler/ @prowler-cloud/sdk @prowler-cloud/detection-and-remediation
4-
/tests/ @prowler-cloud/sdk @prowler-cloud/detection-and-remediation
5-
/dashboard/ @prowler-cloud/sdk
6-
/docs/ @prowler-cloud/sdk
7-
/examples/ @prowler-cloud/sdk
8-
/util/ @prowler-cloud/sdk
9-
/contrib/ @prowler-cloud/sdk
10-
/permissions/ @prowler-cloud/sdk
11-
/codecov.yml @prowler-cloud/sdk @prowler-cloud/api
2+
/* @prowler-cloud/detection-remediation
3+
/prowler/ @prowler-cloud/detection-remediation
4+
/prowler/compliance/ @prowler-cloud/compliance
5+
/tests/ @prowler-cloud/detection-remediation
6+
/dashboard/ @prowler-cloud/detection-remediation
7+
/docs/ @prowler-cloud/detection-remediation
8+
/examples/ @prowler-cloud/detection-remediation
9+
/util/ @prowler-cloud/detection-remediation
10+
/contrib/ @prowler-cloud/detection-remediation
11+
/permissions/ @prowler-cloud/detection-remediation
12+
/codecov.yml @prowler-cloud/detection-remediation @prowler-cloud/api
1213

1314
# API
1415
/api/ @prowler-cloud/api
@@ -17,7 +18,7 @@
1718
/ui/ @prowler-cloud/ui
1819

1920
# AI
20-
/mcp_server/ @prowler-cloud/ai
21+
/mcp_server/ @prowler-cloud/detection-remediation
2122

2223
# Platform
2324
/.github/ @prowler-cloud/platform

.github/actions/setup-python-poetry/action.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,19 @@ inputs:
1313
poetry-version:
1414
description: 'Poetry version to install'
1515
required: false
16-
default: '2.1.1'
16+
default: '2.3.4'
1717
install-dependencies:
1818
description: 'Install Python dependencies with Poetry'
1919
required: false
2020
default: 'true'
21+
update-lock:
22+
description: 'Run `poetry lock` during setup. Only enable when a prior step mutates pyproject.toml (e.g. API `@master` VCS rewrite). Default: false.'
23+
required: false
24+
default: 'false'
25+
enable-cache:
26+
description: 'Whether to enable Poetry dependency caching via actions/setup-python'
27+
required: false
28+
default: 'true'
2129

2230
runs:
2331
using: 'composite'
@@ -26,10 +34,18 @@ runs:
2634
if: github.event_name == 'pull_request' && github.base_ref == 'master' && github.repository == 'prowler-cloud/prowler'
2735
shell: bash
2836
working-directory: ${{ inputs.working-directory }}
37+
env:
38+
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
2939
run: |
3040
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
31-
echo "Using branch: $BRANCH_NAME"
32-
sed -i "s|\(git+https://github.com/prowler-cloud/prowler[^@]*\)@master|\1@$BRANCH_NAME|g" pyproject.toml
41+
UPSTREAM="prowler-cloud/prowler"
42+
if [ "$HEAD_REPO" != "$UPSTREAM" ]; then
43+
echo "Fork PR detected (${HEAD_REPO}), rewriting VCS URL to fork"
44+
sed -i "s|git+https://github.com/prowler-cloud/prowler\([^@]*\)@master|git+https://github.com/${HEAD_REPO}\1@$BRANCH_NAME|g" pyproject.toml
45+
else
46+
echo "Same-repo PR, using branch: $BRANCH_NAME"
47+
sed -i "s|\(git+https://github.com/prowler-cloud/prowler[^@]*\)@master|\1@$BRANCH_NAME|g" pyproject.toml
48+
fi
3349
3450
- name: Install poetry
3551
shell: bash
@@ -52,21 +68,8 @@ runs:
5268
echo "Updated resolved_reference:"
5369
grep -A2 -B2 "resolved_reference" poetry.lock
5470
55-
- name: Update SDK resolved_reference to latest commit (prowler repo on push)
56-
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'prowler-cloud/prowler'
57-
shell: bash
58-
working-directory: ${{ inputs.working-directory }}
59-
run: |
60-
LATEST_COMMIT=$(curl -s "https://api.github.com/repos/prowler-cloud/prowler/commits/master" | jq -r '.sha')
61-
echo "Latest commit hash: $LATEST_COMMIT"
62-
sed -i '/url = "https:\/\/github\.com\/prowler-cloud\/prowler\.git"/,/resolved_reference = / {
63-
s/resolved_reference = "[a-f0-9]\{40\}"/resolved_reference = "'"$LATEST_COMMIT"'"/
64-
}' poetry.lock
65-
echo "Updated resolved_reference:"
66-
grep -A2 -B2 "resolved_reference" poetry.lock
67-
6871
- name: Update poetry.lock (prowler repo only)
69-
if: github.repository == 'prowler-cloud/prowler'
72+
if: github.repository == 'prowler-cloud/prowler' && inputs.update-lock == 'true'
7073
shell: bash
7174
working-directory: ${{ inputs.working-directory }}
7275
run: poetry lock
@@ -75,8 +78,10 @@ runs:
7578
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
7679
with:
7780
python-version: ${{ inputs.python-version }}
78-
cache: 'poetry'
79-
cache-dependency-path: ${{ inputs.working-directory }}/poetry.lock
81+
# Disable cache when callers skip dependency install: Poetry 2.3.4 creates
82+
# the venv in a path setup-python can't hash, breaking the post-step save-cache.
83+
cache: ${{ inputs.enable-cache == 'true' && 'poetry' || '' }}
84+
cache-dependency-path: ${{ inputs.enable-cache == 'true' && format('{0}/poetry.lock', inputs.working-directory) || '' }}
8085

8186
- name: Install Python dependencies
8287
if: inputs.install-dependencies == 'true'

.github/actions/trivy-scan/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ runs:
117117
INPUTS_IMAGE_TAG: ${{ inputs.image-tag }}
118118

119119
- name: Comment scan results on PR
120-
if: inputs.create-pr-comment == 'true' && github.event_name == 'pull_request'
120+
if: >-
121+
inputs.create-pr-comment == 'true'
122+
&& github.event_name == 'pull_request'
123+
&& github.event.pull_request.head.repo.full_name == github.repository
121124
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
122125
env:
123126
IMAGE_NAME: ${{ inputs.image-name }}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ updates:
6666
cooldown:
6767
default-days: 7
6868

69+
- package-ecosystem: "pre-commit"
70+
directory: "/"
71+
schedule:
72+
interval: "monthly"
73+
open-pull-requests-limit: 25
74+
target-branch: master
75+
labels:
76+
- "dependencies"
77+
- "pre-commit"
78+
cooldown:
79+
default-days: 7
80+
6981
# Dependabot Updates are temporary disabled - 2025/04/15
7082
# v4.6
7183
# - package-ecosystem: "pip"

.github/labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ provider/googleworkspace:
6767
- any-glob-to-any-file: "prowler/providers/googleworkspace/**"
6868
- any-glob-to-any-file: "tests/providers/googleworkspace/**"
6969

70+
provider/vercel:
71+
- changed-files:
72+
- any-glob-to-any-file: "prowler/providers/vercel/**"
73+
- any-glob-to-any-file: "tests/providers/vercel/**"
74+
7075
github_actions:
7176
- changed-files:
7277
- any-glob-to-any-file: ".github/workflows/*"
@@ -102,6 +107,8 @@ mutelist:
102107
- any-glob-to-any-file: "tests/providers/openstack/lib/mutelist/**"
103108
- any-glob-to-any-file: "prowler/providers/googleworkspace/lib/mutelist/**"
104109
- any-glob-to-any-file: "tests/providers/googleworkspace/lib/mutelist/**"
110+
- any-glob-to-any-file: "prowler/providers/vercel/lib/mutelist/**"
111+
- any-glob-to-any-file: "tests/providers/vercel/lib/mutelist/**"
105112

106113
integration/s3:
107114
- changed-files:

.github/test-impact.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ modules:
177177
- tests/providers/llm/**
178178
e2e: []
179179

180+
- name: sdk-vercel
181+
match:
182+
- prowler/providers/vercel/**
183+
- prowler/compliance/vercel/**
184+
tests:
185+
- tests/providers/vercel/**
186+
e2e: []
187+
180188
# ============================================
181189
# SDK - Lib modules
182190
# ============================================

.github/workflows/api-bump-version.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ env:
1313
PROWLER_VERSION: ${{ github.event.release.tag_name }}
1414
BASE_BRANCH: master
1515

16+
permissions: {}
17+
1618
jobs:
1719
detect-release-type:
1820
runs-on: ubuntu-latest
@@ -27,6 +29,11 @@ jobs:
2729
patch_version: ${{ steps.detect.outputs.patch_version }}
2830
current_api_version: ${{ steps.get_api_version.outputs.current_api_version }}
2931
steps:
32+
- name: Harden the runner (Audit all outbound calls)
33+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
34+
with:
35+
egress-policy: audit
36+
3037
- name: Checkout repository
3138
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3239
with:
@@ -79,6 +86,11 @@ jobs:
7986
contents: read
8087
pull-requests: write
8188
steps:
89+
- name: Harden the runner (Audit all outbound calls)
90+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
91+
with:
92+
egress-policy: audit
93+
8294
- name: Checkout repository
8395
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8496
with:
@@ -204,6 +216,11 @@ jobs:
204216
contents: read
205217
pull-requests: write
206218
steps:
219+
- name: Harden the runner (Audit all outbound calls)
220+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
221+
with:
222+
egress-policy: audit
223+
207224
- name: Checkout repository
208225
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
209226
with:

.github/workflows/api-code-quality.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ concurrency:
1717
env:
1818
API_WORKING_DIR: ./api
1919

20+
permissions: {}
21+
2022
jobs:
2123
api-code-quality:
2224
runs-on: ubuntu-latest
@@ -32,6 +34,16 @@ jobs:
3234
working-directory: ./api
3335

3436
steps:
37+
- name: Harden Runner
38+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
39+
with:
40+
egress-policy: block
41+
allowed-endpoints: >
42+
github.com:443
43+
pypi.org:443
44+
files.pythonhosted.org:443
45+
api.github.com:443
46+
3547
- name: Checkout repository
3648
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3749
with:
@@ -40,7 +52,7 @@ jobs:
4052

4153
- name: Check for API changes
4254
id: check-changes
43-
uses: tj-actions/changed-files@7dee1b0c1557f278e5c7dc244927139d78c0e22a # v47.0.4
55+
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
4456
with:
4557
files: |
4658
api/**
@@ -57,6 +69,7 @@ jobs:
5769
with:
5870
python-version: ${{ matrix.python-version }}
5971
working-directory: ./api
72+
update-lock: 'true'
6073

6174
- name: Poetry check
6275
if: steps.check-changes.outputs.any_changed == 'true'

0 commit comments

Comments
 (0)