Giter Site home page Giter Site logo

paloaltonetworks / prisma.pan.dev Goto Github PK

View Code? Open in Web Editor NEW
21.0 10.0 38.0 29.11 MB

The home of Developer docs for Prisma by Palo Alto Networks

Home Page: https://prisma.pan.dev

License: MIT License

JavaScript 71.51% CSS 26.71% TypeScript 1.78%
paloaltonetworks palo-alto-networks paloalto palo-alto prisma prismacloud prisma-cloud prisma-cloud-api

prisma.pan.dev's Introduction

prisma.pan.dev's People

Contributors

arun728 avatar csestito avatar debbm avatar dependabot[bot] avatar dopurcell avatar gabe-sky avatar iansk avatar jamcg avatar jb-sec avatar johnathanludwig avatar kartikp10 avatar kdpanw avatar mcmoodoo avatar mph13 avatar mxrehan avatar pubs-mv avatar sarette avatar schosterbarak avatar solalraveh avatar sserrata avatar ssugandh avatar stechavat avatar sullivan1337 avatar trlinkin avatar turbodog avatar tylercamp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

prisma.pan.dev's Issues

Issue with "policies" in 22_06 docs

Error in Container Policy (and probably other) Docs

https://prisma.pan.dev/api/cloud/cwpp/policies#operation/get-policies-firewall-app-container

Screen Shot 2022-08-26 at 10 30 25 AM

Errors with server specifics and a Stack Trace.

A Stack Trace!! We are a security company and this sort of information absolutely should not bleed.

TypeError: this.description.search is not a function
    at new mn (https://prisma.pan.dev/assets/js/common.f1a889d2.js:41:17055)
    at new Zr (https://prisma.pan.dev/assets/js/common.f1a889d2.js:41:40402)
    at new il (https://prisma.pan.dev/assets/js/common.f1a889d2.js:1217:2803)
    at https://prisma.pan.dev/assets/js/common.f1a889d2.js:118:539
    at Object.Ti [as useMemo] (https://prisma.pan.dev/assets/js/main.03a4108b.js:2:392249)
    at t.useMemo (https://prisma.pan.dev/assets/js/main.03a4108b.js:2:477214)
    at $i (https://prisma.pan.dev/assets/js/common.f1a889d2.js:118:496)
    at li (https://prisma.pan.dev/assets/js/main.03a4108b.js:2:387545)
    at Hi (https://prisma.pan.dev/assets/js/main.03a4108b.js:2:397063)
    at Yc (https://prisma.pan.dev/assets/js/main.03a4108b.js:2:440597)

Suggested fix

  1. Fix underlying problem
  2. Obscure errors: do not offer a stack trace

Issue with "Access the API (SaaS)" in @site/docs/cloud/cwpp/access-api-saas.md

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

"Path to Console" cannot be found at: Compute > Manage > System > Downloads
Because the "Downloads" tab does not exist in our UI.

Suggested fix

"Path to Console" can be found at: Compute > Manage > System > Utilities

Issue with "Prisma Cloud API Time Range Model" in @site/api/cloud/api-time-range-model.md

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

https://prisma.pan.dev/api/cloud/api-time-range-model#alert-dismissal--ime-range-model
The above is missing a "T" for "Time Range Model"

yes

Current:
Alert Dismissal ime Range Model#

Proposed:
Alert Dismissal Time Range Model#

Suggested fix

Add the letter "T"

Issue with "policies"

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

The page https://prisma.pan.dev/api/cloud/cwpp/policies, and other sibling pages under API Cloud, do not open correctly, but instead, they show an error message.

"API version": "22.06.179"

For previous API versions, these pages open as expected.

"Something went wrong...
this.description.search is not a function. (In 'this.description.search(/^##?\s+/m)', 'this.description.search' is undefined)"

There is also a stack trace on the page:

mn@https://prisma.pan.dev/assets/js/common.f1a889d2.js:41:621854
Zr@https://prisma.pan.dev/assets/js/common.f1a889d2.js:41:645201
il@https://prisma.pan.dev/assets/js/common.f1a889d2.js:1217:710070
@https://prisma.pan.dev/assets/js/common.f1a889d2.js:118:657044
Ti@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:392250
$i@https://prisma.pan.dev/assets/js/common.f1a889d2.js:118:657002
li@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:387546
Hi@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:397065
Nl@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:426898
Cl@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:426826
Al@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:426689
wl@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:423676
wl@[native code]
@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:373465
@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:481228
Xo@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:373411
Ko@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:373346
hl@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:421061
Ri@https://prisma.pan.dev/assets/js/main.03a4108b.js:2:392843
Ri@[native code]
@https://prisma.pan.dev/assets/js/common.f1a889d2.js:118:656765
generatorResume@[native code]
i@https://prisma.pan.dev/assets/js/common.f1a889d2.js:118:656813
promiseReactionJob@[native code]

ReDoc Version: 2.0.0-rc.64
Commit: 3b576c8

Suggested fix

Issue with "21.04 Porting Guide" in @site/docs/cloud/cwpp/porting_guide.md

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

For Add Registry Spec API, "collections" param is required to make the call. It is not mentioned in the porting guide so the customer reported us the issue in the documentation.

Suggested fix

curl -k
-u
-H 'Content-Type: application/json'
-X POST
-d '
{
"version": "2",
"registry": "",
"repository": "library/alpine",
"tag": "16.04",
"os": "linux",
"cap": 5,
"hostname": "",
"scanners": 2,
"collections": ["Test"],
} '
https://:8083/api/v1/settings/registry

Issue with "User Profile API" - Wrong schema used in openapi spec

Describe the problem

The REST API Endpoint /user/me returns MultiRoleUserProfile instead of UserProfileModel.

In the documentation the expected object has the attribute roleId but roleIds is returned:
https://prisma.pan.dev/api/cloud/cspm/user-profile#operation/get-my-profile

How to reproduce

import requests

url = "https://api.prismacloud.io/user/me"
headers = {"x-redlock-auth": "REPLACE_KEY_VALUE"}
response = requests.request("GET", url, headers=headers)
print(response.text)
# Returns: {.... "roleIds": [...] ...}

Suggested fix

Update the returned object in the OpenAPI spec from UserProfileModel towards MultiRoleUserProfile or make use of oneOf, anyOf, allOf as described in the openapi specification:
https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/

Issue with "User Role API"

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

Update User Role name and roleType are not requiered. Update works for example also with only accountGroupIds.

Suggested fix

Remove requiered tags.

Issue with "Policy API" in @site/api/cloud/cspm/policy.mdx

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

The "Update Policy" endpoint states that not ALL body params are required. This is true, but there are still red stars indicating required params - these should be removed if not necessary. Second, the blurb below states that the policy will stay "enabled" if you don't pass anything; this is not true. When updating the policy via this endpoint, any modification without also explicitly passing the "enabled: true" param will actually DISABLE the policy.

Location:
https://prisma.pan.dev/api/cloud/cspm/policy#operation/update-policy

States:

Although multiple body parameters are marked as required, to update a policy, you need to provide only the body parameters that you want to update with the exception of the boolean parameter enabled, which will default to a value of true unless otherwise specified

Suggested fix

  1. Remove the red stars for the non-required params
  2. Change the API endpoint to when a param is passed, keep the policy enabled. (Please don't just change the document. The API is broken and should remain enabled when updating a policy).

Kenna - Prisma integration stopped working Aug. 20th

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

These Prisma runs are not ingesting any data because the API is returning a 404 when we attempt to retrieve current projects from Prisma.

Endpoint: https://europe-west3.cloud.twistlock.com/eu-2-143540008/api/v1/current/projects
Response: 404 NotFound

The public Prisma API docs mention newer versions, but testing these new endpoints also resulted in the same response as above: https://prisma.pan.dev/api/cloud/cwpp/current/#operation/get-current-projects

The documentation may need to be updated with more accurate URLs or some possible network related issue between Prisma and Kenna is occurring.

invalid credential

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

Suggested fix

Issue with "Alerts API" - List Alerts V2 - GET may return HTTP 413

Describe the problem

The List Alerts V2 - GET endpoint returns HTTP 413 under certain (unclear) conditions. The List Alerts V2 - POST endpoint does not seem to have this issue. HTTP 413 is not mentioned as a possible response code for the GET endpoint, and there doesn't seem to be anything to suggest that these endpoints would behave differently such that the POST endpoint would be unaffected.

https://prisma.pan.dev/api/cloud/cspm/alerts#operation/get-alerts-v2

(This issue is based on support case 02378102.)

Suggested fix

Any of the following:

  • Add HTTP 413 to the set of possible responses for the GET endpoint, with a summary of the cause of this response code
  • Deprecate the GET endpoint, or add a note that the POST endpoint is more reliable and preferred

Additional Information

In our support case we made a request to the GET endpoint specifying timeUnit=day&timeAmount=10&detailed=true&limit=1&alert.status=open. The first request succeeded, but attempting to get the next page using the pageToken param led to HTTP 413. Using the same filter with pagination for the POST endpoint, as recommended by support, did not have this issue.

We did not see this error in our test environment, with ~120 alerts, but saw it in a larger production environment with substantially more alerts.

Issue with "images"

Issue with "containers" in @site/api/cloud/cwpp/containers.mdx

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

It is not clear what "fields" can be used for filtering. Please, include information about all the fields that can be used.

Suggested fix

Issue with "Prisma Cloud API Error Responses"

Hi Team,

the below curl command is working fine but when i used in python as below. it is throwing 405 Method not allowed error.

python request - requests.post(url, json=credentials, headers=headers)

Curl command - curl --request POST 'https://api3.prismacloud.io/login' -H 'Content-Type: application/json' -data '{"username":"","password":""}'

please check and help me to fix this

v3/user

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

the error 'x-redlock-status': '[{"severity":"error","i18nKey":"wrong_email_format"}] is received
trying to create new user via rest API

the email is valid

Issue with "Prisma Cloud CSPM API Time Range Model" in @site/api/cloud/api-time-range-model.md

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

With alerts v2, I am told that you can specify :

{
  "timeRange": {
    "value": {
      "unit": "hour",
      "amount": 24
    },
    "type": "relative"
  },
  "filters": [
    {
      "name": "alert.status",
      "value": "resolved",
      "operator": "="
    },
    {
      "name": "alert.status",
      "value": "open",
      "operator": "="
    }
  ],
    "timeRangeType": "ALERT_UPDATED"
}

But there is no information or detail on the "timeRangeType": "ALERT_UPDATED" parameter

Suggested fix

Issue with "Search Manager API" in @site/api/cloud/cspm/searchmanager.mdx

Describe the problem

When performing a search for all "saved" searches. get a 400 error
https://api3.prismacloud.io/search/history
filter: saved
limit: -1

https://api3.prismacloud.io:443 "GET /search/history HTTP/1.1" 400 0

Expected results

Expected back json with all of the saved searches for the account

Special Notes

If performing a specific search ID lookup the api works as expected
https://api3.prismacloud.io:443 "GET /search/history/
{"cloudType":"aws", "id": ...}

Issue with "images"

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

API reference pages are not getting loaded. Request is getting timed out.

Screenshot 2023-02-13 at 7 19 00 PM

Suggested fix

Move copy button to a place not hidden

There's an excellent way to copy long queries with one button, instead of using cursor to highlight.
However, one doesn't know it's there till one hovers the cell:
image

then hovering:
image

Suggesting to make it un-hidden for ode blocks and for better visibility potentially under the code block, not in it, as it might not be properly visible.

dark mode source example unreadable

We'll need to have a look the dark mode and how some quote sections look like which are unreadable, like:
image

vs
image

(compare all 'twistcli' entries). it's the stuff wrapped with these ticks: `
I'll have a look at what can be done and make a PR for it to be tied here, but we might need Charlie's additional help with this.

Issue with "CWPP API" in @site/api/cloud/cwpp/cwpp-home.md

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

The content in this topic needs some fixes and additional information.

Suggested fix

Here is what I suggest:
The Prisma Cloud Workload Protection APIs enable both automation and integration. Use the REST APIs to set up, configure, reconfigure, and deploy Prisma Cloud Compute components that enable you to secure your host, container, and serverless computing environments against vulnerabilities, malware, and compliance violations. You can also use it to extract data and integrate it with monitoring, alerting, and other systems in your environment.

For information on how to access the APIs, see https://prisma.pan.dev/docs/cloud/cwpp/cwpp-gs.
And if you are using the self-hosted version (Prisma Cloud Compute Edition), see https://prisma.pan.dev/docs/cloud/cwpp/porting-guide for the differences between versions 21.04 and 20.12.

[Community Health Assessment] Changes needed

This issue was opened by a bot called Community Health (PANW) because this repo has failed too many community health checks.

Repo maintainers: Please take the time to fix the issues in the table to reach the target score. These improvements will help others find your work and contribute to it. This issue will update as your score improves until it hits the target score.

Click More info for instructions to fix each item.

Health Check Pass Score More Info
Contains a meaningful README.md file 0 / 20 More info
SUPPORT.md file exists 20 / 20 More info
Repo has a description 15 / 15 More info
Has a recognized open source license 15 / 15 More info
Has a descriptive repo name 15 / 15 More info
Required topics attached to repo 15 / 15 More info
CONTRIBUTING.md file with contribution guidelines 0 / 5 More info
Has custom issue and pull request templates 0 / 5 More info

Current score: 80
Target threshold: 100
Total possible: 110

Rest API /api/v21.08/registry not work with param layers=true

Describe the problem

I'm now trying to use Prisma Rest API:
api/v21.08/registry?layers=true&limit=1
What I expect is to get mappings between CVES and image layers but none.

 "history": [
            {
                "created": 1649118014,
                "instruction": "ADD file:0f80c1db9ba5535d5020662b1c880624848316637bf3f9c189f459ab31f365d0 in / ",
                "sizeBytes": 5613109,
                "id": "\u003cmissing\u003e",
                "emptyLayer": false,
               // following the rest api doc, here should be a param called vulnerabilities
            }
        ]

Suggested fix

I'm not sure if it's an api issue or my wrong usage

Issue with "defenders"

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

The page https://prisma.pan.dev/api/cloud/cwpp/defenders/ doesn't load correctly. It seems all the pages underneath also fail to load.

Suggested fix

Not sure about the fix

Issue with "cURL Examples"

Describe the problem

inaccuracy

The documentation says the SaaS and self hosted API's are the same. If you're a SaaS customer you can find the CWPP version and match it to your API version use which is confirmed. Unfortunately, using api2.prismacloud.io results in 404's for these endpoints documented.

After a POST request to api2.prismacloud.io/login to grab the JWT which is fine.

Yet the documentation in other endpoint stub pages: https://prisma.pan.dev/api/cloud/cwpp/stats#operation/get-stats-vulnerabilities-download show Curl using a user as part of the authentication.

Creating a subsequent request as mentioned in: https://prisma.pan.dev/api/cloud/cwpp/curl-examples for testing with the following:

Method GET request to: https://api2.prismacloud.io/api/v1/policies/compliance/container
Headers:
Content-Type: application/json
Authorization: Bearer

This results in a 404 no matter what; even when trying other endpoints such as: https://api2.prismacloud.io/api/v22.06/stats/vulnerabilities

I have confirmed in the CWPP is the same version of the path of the URL for the endpoint consumption in Postman. Even if there were header/syntax issues from Postman or Curl. The return should not be a 404.

I have attempted variants of possible known URLs to use such as:
api.prismacloud.io/* <-- also returns a 404
app2.prismacloud.io/* <-- only returns a 404 image

Please advise as the exact curl to use with SaaS hosted CWPP customers using a JWT bearer token hosted on the app2 tenant.

Suggested fix

Unknown to me

Issue with "settings"

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

(https://prisma.pan.dev/api/cloud/cwpp/settings#operation/put-settings-vm) has stale information on what options for the API are critical. collections is listed as critical but does not appear in the request sample for this API endpoint. Collections used to be part of the AMI vulnerability scanning config but that dropped off in early 2022.

collections - Filter for refining the scope of VM images to scan. You can scope by VM image name and AWS tag.

No you actually cannot do this anymore.

Suggested fix

Remove references to collections in the API docs for the VM (AMI scanning) endpoint as it is no longer a valid inclusion.

API route /resource/raw return 404 [DOCUMENTATION]

Thank you for taking the time to help us improve our documentation! Please describe the problem and a suggested fix below and we'll get back to you as soon as we can. --DevRel

Describe the problem

the CSPM's route /resource/raw return 404, when inspecting using the UI, the request to get the raw resource's metadata routed to /resource instead of /resource/raw

Suggested fix

I suggest we remove this route from the documentation
https://github.com/PaloAltoNetworks/prisma.pan.dev/blob/master/static/oas/cspm/ResourceExplorer.yaml#L639-L670

Issue with "IP Allow List API" in @site/api/cloud/cspm/ipallowlist.mdx

Describe the problem

  1. Created a network list called "example-dev"
  • ⚠️ the cidrs field is not returned in the response
  1. Added cidr "54.1.1.253/32" to the list "example-dev"
  2. Created a new network list called "example-prod"
  3. Added cidr "54.1.1.253/32" to the list "example-prod"
  • ⚠️ 400 returned, adding any other public IP works as expected. I am left to assume that CIDRs must be unique across network lists but this isn't expected since each network list and cidr object has a uuid.

Suggested fix

  1. Either update the docs to reflect that CIDRs must be globally unique or allow for the same CIDRs to be added across different network lists.
  2. Update the docs to reflect that the cidrs field is not returned in the create network list API return

Issue with "Serverless Runtime Policy" TW_POLICY: Missing Documentation

Describe the problem

Currently we are automating our Twistlock deployment process through custom Terraform Modules that we've created. In order to defend and assess any vulnerabilities that are related to our AWS Lambda functions, for example, will require us to create a Lambda Layer to append the NodeJS twistlock.handler function. In order to achieve this, we make a cURL request to obtain our images/twistlock_defender_layer.zip file. However the configuration will only work if we have the following environment variables:

  • ORIGINAL_HANDLER - Which points to the original handler if Twistlock is enabled for that Lambda resource
  • TW_POLICY - Which provides the Twistlock function with the configuration as a base64 encoded string.

The Issue

The issue we currently have, in order to fully automate this process as part of our CI/CD, is that there is no properly documented way of obtaining the TW_POLICY without using the Console UI. After inspecting the network calls, I found that when generating the policy, there's a payload sent to a specific endpoint which isn't documented under Policies.

Suggested fix

After inspecting the calls, it was found that a POST request is made to the console:
{{CONSOLE_URL}}/{{CONSOLE_ID}}/api/v1/policies/runtime/serverless/encode

With the following payload:

{
    "consoleAddr": "us-west1.cloud.twistlock.com",
    "function": "LAMBDA_NAME",
    "provider": "CLOUD_PROVIDER",
    "region": "CLOUD_REGION"
}

Response:
{
"data": "TW_POLICY_BASE64",
}

The suggestion is to update the documentation to reflect that additional endpoint which should be available via the API. If there proves to be an issue with this approach, please advise as we believe this is the best way to obtain the policy.

[Community Health Assessment] Changes needed

Health Check Pass Score More Info
Contains a meaningful README.md file 20 / 20 More info
SUPPORT.md file exists 20 / 20 More info
Repo has a description 15 / 15 More info
Has a recognized open source license 15 / 15 More info
Has a descriptive repo name 15 / 15 More info
Required topics attached to repo 15 / 15 More info
CONTRIBUTING.md file with contribution guidelines 5 / 5 More info
Has custom issue and pull request templates 0 / 5 More info

Current score: 105
Target threshold: 100
Total possible: 110

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.