Skip to content

Updates database #483

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

Merged
merged 3 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .safety-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ security:
ignore-vulnerabilities:
67599:
reason: pip won't fix it, because it is an intended behaviour
71064:
reason: the updated requests version is ony available for Python 3.8+
1 change: 1 addition & 0 deletions examples/yml/crud-with-exclude-actions-empty-sid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ write:
- arn:aws:s3:::test
exclude-actions:
- "iam:Pass*"
- "s3:GetReplicationConfiguration"
10 changes: 9 additions & 1 deletion policy_sentry/shared/awsdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ def no_white_space(string: str) -> str:
return "".join(str(string).split())


def sanitize_service_name(action: str) -> str:
service, action_name = action.split(":")
return f"{service.lower()}:{action_name}"


def create_database(
destination_directory: str, access_level_overrides_file: str
) -> None:
Expand Down Expand Up @@ -334,7 +339,10 @@ def create_database(
for (
action_element
) in dependent_actions_element.find_all("p"):
dependent_actions.append(chomp(action_element.text))
chomped_action = chomp(action_element.text)
dependent_actions.append(
sanitize_service_name(chomped_action)
)
if "*" in resource_type:
required = True
resource_type = resource_type.strip("*")
Expand Down
25 changes: 25 additions & 0 deletions policy_sentry/shared/data/docs/list_amazonbedrock.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,31 @@ <h6>
</th>
</tr>
</thead>
<tr>
<td id="amazonbedrock-AllowVendedLogDeliveryForResource" tabindex="-1">
<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html">
AllowVendedLogDeliveryForResource
</a>
[permission only]
</td>
<td tabindex="-1">
Grants permission to configure vended log delivery for a knowledge base
</td>
<td tabindex="-1">
Permissions management
</td>
<td tabindex="-1">
<p>
<a href="#amazonbedrock-knowledge-base">
knowledge-base
</a>
</p>
</td>
<td tabindex="-1">
</td>
<td tabindex="-1">
</td>
</tr>
<tr>
<td id="amazonbedrock-ApplyGuardrail" tabindex="-1">
<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h1 class="topictitle" id="list_amazoncloudwatchapplicationsignals">
<li class="listitem">
<p>
Learn how to
<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/">
<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Application-Monitoring-Sections.html">
configure this service
</a>
.
Expand All @@ -196,7 +196,7 @@ <h1 class="topictitle" id="list_amazoncloudwatchapplicationsignals">
<li class="listitem">
<p>
View a list of the
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/">
API operations available for this service
</a>
.
Expand All @@ -205,7 +205,7 @@ <h1 class="topictitle" id="list_amazoncloudwatchapplicationsignals">
<li class="listitem">
<p>
Learn how to secure this service and its resources by
<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Application_Signals_Permissions.html">
<a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/auth-and-access-control-cw.html">
using IAM
</a>
permission policies.
Expand Down Expand Up @@ -335,7 +335,7 @@ <h6>
</thead>
<tr>
<td id="amazoncloudwatchapplicationsignals-BatchGetServiceLevelObjectiveBudgetReport" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_BatchGetServiceLevelObjectiveBudgetReport.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_BatchGetServiceLevelObjectiveBudgetReport.html">
BatchGetServiceLevelObjectiveBudgetReport
</a>
</td>
Expand All @@ -359,7 +359,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-CreateServiceLevelObjective" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_CreateServiceLevelObjective.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_CreateServiceLevelObjective.html">
CreateServiceLevelObjective
</a>
</td>
Expand Down Expand Up @@ -388,7 +388,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-DeleteServiceLevelObjective" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_DeleteServiceLevelObjective.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_DeleteServiceLevelObjective.html">
DeleteServiceLevelObjective
</a>
</td>
Expand All @@ -412,7 +412,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-GetService" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_GetService.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_GetService.html">
GetService
</a>
</td>
Expand All @@ -431,7 +431,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-GetServiceLevelObjective" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_GetServiceLevelObjective.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_GetServiceLevelObjective.html">
GetServiceLevelObjective
</a>
</td>
Expand All @@ -455,7 +455,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-ListServiceDependencies" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_ListServiceDependencies.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceDependencies.html">
ListServiceDependencies
</a>
</td>
Expand All @@ -474,7 +474,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-ListServiceDependents" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_ListServiceDependents.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceDependents.html">
ListServiceDependents
</a>
</td>
Expand All @@ -493,7 +493,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-ListServiceLevelObjectives" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_ListServiceLevelObjectives.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceLevelObjectives.html">
ListServiceLevelObjectives
</a>
</td>
Expand All @@ -512,7 +512,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-ListServiceOperations" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_ListServiceOperations.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServiceOperations.html">
ListServiceOperations
</a>
</td>
Expand All @@ -531,7 +531,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-ListServices" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_ListServices.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListServices.html">
ListServices
</a>
</td>
Expand All @@ -550,7 +550,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-ListTagsForResource" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_ListTagsForResource.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_ListTagsForResource.html">
ListTagsForResource
</a>
</td>
Expand All @@ -574,7 +574,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-StartDiscovery" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_StartDiscovery.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_StartDiscovery.html">
StartDiscovery
</a>
</td>
Expand All @@ -593,7 +593,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-TagResource" rowspan="2" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_TagResource.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_TagResource.html">
TagResource
</a>
</td>
Expand Down Expand Up @@ -635,7 +635,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-UntagResource" rowspan="2" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_UntagResource.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_UntagResource.html">
UntagResource
</a>
</td>
Expand Down Expand Up @@ -672,7 +672,7 @@ <h6>
</tr>
<tr>
<td id="amazoncloudwatchapplicationsignals-UpdateServiceLevelObjective" tabindex="-1">
<a href="https://docs.aws.amazon.com/cloudwatchapplicationsignals/latest/APIReference/API_UpdateServiceLevelObjective.html">
<a href="https://docs.aws.amazon.com/applicationsignals/latest/APIReference/API_UpdateServiceLevelObjective.html">
UpdateServiceLevelObjective
</a>
</td>
Expand Down
Loading