Skip to content

Commit f1f0609

Browse files
MrCloudSecdependabot[bot]MarioRgzLpzdanibarranquerooprowler-bot
authored
chore(release): point v4.4 to master (#5250)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mario Rodriguez Lopez <[email protected]> Co-authored-by: Daniel Barranquero <[email protected]> Co-authored-by: Prowler Bot <[email protected]> Co-authored-by: Pedro Martín <[email protected]> Co-authored-by: Hugo Pereira Brito <[email protected]> Co-authored-by: LefterisXefteris <[email protected]> Co-authored-by: Lefteris Gilmaz <[email protected]> Co-authored-by: Rubén De la Torre Vico <[email protected]> Co-authored-by: Amogh Bantwal <[email protected]> Co-authored-by: Harshit Raj Singh <[email protected]> Co-authored-by: Pepe Fagoaga <[email protected]> Co-authored-by: Jude Bae(Bae cheongho) <[email protected]> Co-authored-by: MZC01-JUDE <[email protected]> Co-authored-by: johannes-engler-mw <[email protected]>
1 parent 1af7f65 commit f1f0609

File tree

593 files changed

+29455
-5464
lines changed

Some content is hidden

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

593 files changed

+29455
-5464
lines changed

.github/workflows/build-lint-push-containers.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
run: |
154154
curl https://api.github.com/repos/${{ secrets.DISPATCH_OWNER }}/${{ secrets.DISPATCH_REPO }}/dispatches \
155155
-H "Accept: application/vnd.github+json" \
156-
-H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
156+
-H "Authorization: Bearer ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }}" \
157157
-H "X-GitHub-Api-Version: 2022-11-28" \
158158
--data '{"event_type":"dispatch","client_payload":{"version":"v3-latest", "tag": "${{ env.LATEST_COMMIT_HASH }}"}}'
159159
@@ -162,6 +162,6 @@ jobs:
162162
run: |
163163
curl https://api.github.com/repos/${{ secrets.DISPATCH_OWNER }}/${{ secrets.DISPATCH_REPO }}/dispatches \
164164
-H "Accept: application/vnd.github+json" \
165-
-H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \
165+
-H "Authorization: Bearer ${{ secrets.PROWLER_BOT_ACCESS_TOKEN }}" \
166166
-H "X-GitHub-Api-Version: 2022-11-28" \
167167
--data '{"event_type":"dispatch","client_payload":{"version":"release", "tag":"${{ needs.container-build-push.outputs.prowler_version }}"}}'

.github/workflows/find-secrets.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
with:
1212
fetch-depth: 0
1313
- name: TruffleHog OSS
14-
uses: trufflesecurity/trufflehog@v3.81.10
14+
uses: trufflesecurity/trufflehog@v3.82.6
1515
with:
1616
path: ./
1717
base: ${{ github.event.repository.default_branch }}

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ It contains hundreds of controls covering CIS, NIST 800, NIST CSF, CISA, RBI, Fe
6363

6464
| Provider | Checks | Services | [Compliance Frameworks](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/compliance/) | [Categories](https://docs.prowler.com/projects/prowler-open-source/en/latest/tutorials/misc/#categories) |
6565
|---|---|---|---|---|
66-
| AWS | 415 | 67 -> `prowler aws --list-services` | 28 -> `prowler aws --list-compliance` | 9 -> `prowler aws --list-categories` |
67-
| GCP | 77 | 13 -> `prowler gcp --list-services` | 1 -> `prowler gcp --list-compliance` | 2 -> `prowler gcp --list-categories`|
68-
| Azure | 135 | 16 -> `prowler azure --list-services` | 2 -> `prowler azure --list-compliance` | 2 -> `prowler azure --list-categories` |
66+
| AWS | 457 | 67 -> `prowler aws --list-services` | 30 -> `prowler aws --list-compliance` | 9 -> `prowler aws --list-categories` |
67+
| GCP | 77 | 13 -> `prowler gcp --list-services` | 2 -> `prowler gcp --list-compliance` | 2 -> `prowler gcp --list-categories`|
68+
| Azure | 136 | 17 -> `prowler azure --list-services` | 3 -> `prowler azure --list-compliance` | 2 -> `prowler azure --list-categories` |
6969
| Kubernetes | 83 | 7 -> `prowler kubernetes --list-services` | 1 -> `prowler kubernetes --list-compliance` | 7 -> `prowler kubernetes --list-categories` |
7070

7171
# 💻 Installation

dashboard/common_methods.py

+229
Original file line numberDiff line numberDiff line change
@@ -2223,3 +2223,232 @@ def get_section_containers_ens(data, section_1, section_2, section_3, section_4)
22232223
section_containers.append(section_container)
22242224

22252225
return html.Div(section_containers, className="compliance-data-layout")
2226+
2227+
2228+
# This function extracts and compares up to two numeric values, ensuring correct sorting for version-like strings.
2229+
def extract_numeric_values(value):
2230+
numbers = re.findall(r"\d+", str(value))
2231+
if len(numbers) >= 2:
2232+
return int(numbers[0]), int(numbers[1])
2233+
elif len(numbers) == 1:
2234+
return int(numbers[0]), 0
2235+
return 0, 0
2236+
2237+
2238+
def get_section_containers_kisa_ismsp(data, section_1, section_2):
2239+
data["STATUS"] = data["STATUS"].apply(map_status_to_icon)
2240+
data[section_1] = data[section_1].astype(str)
2241+
data[section_2] = data[section_2].astype(str)
2242+
data.sort_values(
2243+
by=section_1,
2244+
key=lambda x: x.map(extract_numeric_values),
2245+
ascending=True,
2246+
inplace=True,
2247+
)
2248+
2249+
findings_counts_section = (
2250+
data.groupby([section_2, "STATUS"]).size().unstack(fill_value=0)
2251+
)
2252+
findings_counts_name = (
2253+
data.groupby([section_1, "STATUS"]).size().unstack(fill_value=0)
2254+
)
2255+
2256+
section_containers = []
2257+
2258+
for name in data[section_1].unique():
2259+
success_name = (
2260+
findings_counts_name.loc[name, pass_emoji]
2261+
if pass_emoji in findings_counts_name.columns
2262+
else 0
2263+
)
2264+
failed_name = (
2265+
findings_counts_name.loc[name, fail_emoji]
2266+
if fail_emoji in findings_counts_name.columns
2267+
else 0
2268+
)
2269+
2270+
fig_name = go.Figure(
2271+
data=[
2272+
go.Bar(
2273+
name="Failed",
2274+
x=[failed_name],
2275+
y=[""],
2276+
orientation="h",
2277+
marker=dict(color="#e77676"),
2278+
width=[0.8],
2279+
),
2280+
go.Bar(
2281+
name="Success",
2282+
x=[success_name],
2283+
y=[""],
2284+
orientation="h",
2285+
marker=dict(color="#45cc6e"),
2286+
width=[0.8],
2287+
),
2288+
]
2289+
)
2290+
2291+
fig_name.update_layout(
2292+
barmode="stack",
2293+
margin=dict(l=10, r=10, t=10, b=10),
2294+
paper_bgcolor="rgba(0,0,0,0)",
2295+
plot_bgcolor="rgba(0,0,0,0)",
2296+
showlegend=False,
2297+
width=350,
2298+
height=30,
2299+
xaxis=dict(showticklabels=False, showgrid=False, zeroline=False),
2300+
yaxis=dict(showticklabels=False, showgrid=False, zeroline=False),
2301+
annotations=[
2302+
dict(
2303+
x=success_name + failed_name,
2304+
y=0,
2305+
xref="x",
2306+
yref="y",
2307+
text=str(success_name),
2308+
showarrow=False,
2309+
font=dict(color="#45cc6e", size=14),
2310+
xanchor="left",
2311+
yanchor="middle",
2312+
),
2313+
dict(
2314+
x=0,
2315+
y=0,
2316+
xref="x",
2317+
yref="y",
2318+
text=str(failed_name),
2319+
showarrow=False,
2320+
font=dict(color="#e77676", size=14),
2321+
xanchor="right",
2322+
yanchor="middle",
2323+
),
2324+
],
2325+
)
2326+
2327+
graph_name = dcc.Graph(
2328+
figure=fig_name, config={"staticPlot": True}, className="info-bar"
2329+
)
2330+
2331+
graph_div = html.Div(graph_name, className="graph-section")
2332+
2333+
direct_internal_items = []
2334+
2335+
for section in data[data[section_1] == name][section_2].unique():
2336+
specific_data = data[
2337+
(data[section_1] == name) & (data[section_2] == section)
2338+
]
2339+
success_section = (
2340+
findings_counts_section.loc[section, pass_emoji]
2341+
if pass_emoji in findings_counts_section.columns
2342+
else 0
2343+
)
2344+
failed_section = (
2345+
findings_counts_section.loc[section, fail_emoji]
2346+
if fail_emoji in findings_counts_section.columns
2347+
else 0
2348+
)
2349+
2350+
data_table = dash_table.DataTable(
2351+
data=specific_data.to_dict("records"),
2352+
columns=[
2353+
{"name": i, "id": i}
2354+
for i in ["CHECKID", "STATUS", "REGION", "ACCOUNTID", "RESOURCEID"]
2355+
],
2356+
style_table={"overflowX": "auto"},
2357+
style_as_list_view=True,
2358+
style_cell={"textAlign": "left", "padding": "5px"},
2359+
)
2360+
2361+
fig_section = go.Figure(
2362+
data=[
2363+
go.Bar(
2364+
name="Failed",
2365+
x=[failed_section],
2366+
y=[""],
2367+
orientation="h",
2368+
marker=dict(color="#e77676"),
2369+
),
2370+
go.Bar(
2371+
name="Success",
2372+
x=[success_section],
2373+
y=[""],
2374+
orientation="h",
2375+
marker=dict(color="#45cc6e"),
2376+
),
2377+
]
2378+
)
2379+
2380+
fig_section.update_layout(
2381+
barmode="stack",
2382+
margin=dict(l=10, r=10, t=10, b=10),
2383+
paper_bgcolor="rgba(0,0,0,0)",
2384+
plot_bgcolor="rgba(0,0,0,0)",
2385+
showlegend=False,
2386+
width=350,
2387+
height=30,
2388+
xaxis=dict(showticklabels=False, showgrid=False, zeroline=False),
2389+
yaxis=dict(showticklabels=False, showgrid=False, zeroline=False),
2390+
annotations=[
2391+
dict(
2392+
x=success_section + failed_section,
2393+
y=0,
2394+
xref="x",
2395+
yref="y",
2396+
text=str(success_section),
2397+
showarrow=False,
2398+
font=dict(color="#45cc6e", size=14),
2399+
xanchor="left",
2400+
yanchor="middle",
2401+
),
2402+
dict(
2403+
x=0,
2404+
y=0,
2405+
xref="x",
2406+
yref="y",
2407+
text=str(failed_section),
2408+
showarrow=False,
2409+
font=dict(color="#e77676", size=14),
2410+
xanchor="right",
2411+
yanchor="middle",
2412+
),
2413+
],
2414+
)
2415+
2416+
graph_section = dcc.Graph(
2417+
figure=fig_section,
2418+
config={"staticPlot": True},
2419+
className="info-bar-child",
2420+
)
2421+
2422+
graph_div_section = html.Div(graph_section, className="graph-section-req")
2423+
2424+
internal_accordion_item = dbc.AccordionItem(
2425+
title=section,
2426+
children=[html.Div([data_table], className="inner-accordion-content")],
2427+
)
2428+
2429+
internal_section_container = html.Div(
2430+
[
2431+
graph_div_section,
2432+
dbc.Accordion(
2433+
[internal_accordion_item], start_collapsed=True, flush=True
2434+
),
2435+
],
2436+
className="accordion-inner--child",
2437+
)
2438+
2439+
direct_internal_items.append(internal_section_container)
2440+
2441+
accordion_item = dbc.AccordionItem(
2442+
title=f"{name}", children=direct_internal_items
2443+
)
2444+
section_container = html.Div(
2445+
[
2446+
graph_div,
2447+
dbc.Accordion([accordion_item], start_collapsed=True, flush=True),
2448+
],
2449+
className="accordion-inner",
2450+
)
2451+
2452+
section_containers.append(section_container)
2453+
2454+
return html.Div(section_containers, className="compliance-data-layout")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import warnings
2+
3+
from dashboard.common_methods import get_section_containers_kisa_ismsp
4+
5+
warnings.filterwarnings("ignore")
6+
7+
8+
def get_table(data):
9+
aux = data[
10+
[
11+
"REQUIREMENTS_ID",
12+
"REQUIREMENTS_ATTRIBUTES_SUBDOMAIN",
13+
"REQUIREMENTS_ATTRIBUTES_SECTION",
14+
# "REQUIREMENTS_DESCRIPTION",
15+
"CHECKID",
16+
"STATUS",
17+
"REGION",
18+
"ACCOUNTID",
19+
"RESOURCEID",
20+
]
21+
].copy()
22+
23+
return get_section_containers_kisa_ismsp(
24+
aux, "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", "REQUIREMENTS_ATTRIBUTES_SECTION"
25+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import warnings
2+
3+
from dashboard.common_methods import get_section_containers_kisa_ismsp
4+
5+
warnings.filterwarnings("ignore")
6+
7+
8+
def get_table(data):
9+
aux = data[
10+
[
11+
"REQUIREMENTS_ID",
12+
"REQUIREMENTS_ATTRIBUTES_SUBDOMAIN",
13+
"REQUIREMENTS_ATTRIBUTES_SECTION",
14+
# "REQUIREMENTS_DESCRIPTION",
15+
"CHECKID",
16+
"STATUS",
17+
"REGION",
18+
"ACCOUNTID",
19+
"RESOURCEID",
20+
]
21+
].copy()
22+
23+
return get_section_containers_kisa_ismsp(
24+
aux, "REQUIREMENTS_ATTRIBUTES_SUBDOMAIN", "REQUIREMENTS_ATTRIBUTES_SECTION"
25+
)

docs/developer-guide/checks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Each Prowler check has metadata associated which is stored at the same level of
272272
# Severity holds the check's severity, always in lowercase (critical, high, medium, low or informational)
273273
"Severity": "critical",
274274
# ResourceType only for AWS, holds the type from here
275-
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
275+
# https://docs.aws.amazon.com/securityhub/latest/userguide/asff-resources.html
276276
"ResourceType": "Other",
277277
# Description holds the title of the check, for now is the same as CheckTitle
278278
"Description": "Ensure there are no EC2 AMIs set as Public.",

docs/developer-guide/introduction.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ Once that is satisfied go ahead and clone your forked repo:
1414
git clone https://github.com/<your-github-user>/prowler
1515
cd prowler
1616
```
17-
For isolation and avoid conflicts with other environments, we recommend usage of `poetry`:
18-
```
19-
pip install poetry
20-
```
17+
For isolation and to avoid conflicts with other environments, we recommend using `poetry`, a Python dependency management tool. You can install it by following the instructions [here](https://python-poetry.org/docs/#installation).
18+
2119
Then install all dependencies including the ones for developers:
2220
```
2321
poetry install --with dev

0 commit comments

Comments
 (0)