Skip to content
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

Fix/code policies #168

Merged
merged 3 commits into from
Feb 15, 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
11 changes: 8 additions & 3 deletions prismacloud/api/pccs/_code_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

class CodePoliciesPrismaCloudAPIPCCSMixin:
""" Prisma Cloud Code Security API Code Policies Endpoints Class """

def suppressions_justifications_list_read(self, policy_id):
return self.execute_code_security('GET', 'code/api/v2/policies/%s' % policy_id)

def code_policies_list_read(self, policy_id=None):
if policy_id:
# Fetch details for a specific policy
return self.execute_code_security('GET', 'code/api/v2/policies/%s' % policy_id)
else:
# Fetch a list of all policies if no specific policy_id is provided
return self.execute_code_security('GET', 'code/api/v2/policies')
2 changes: 1 addition & 1 deletion prismacloud/api/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "5.2.13"
version = "5.2.14"
Loading