GitHub Action
Call Pangea API
Call Pangea API
Call Pangea API
Use this action to call any Pangea API as desired
Installation
Copy and paste the following snippet into your .yml file.
- name: Call Pangea API
uses: pangeacyber/pangea-github-action-api@1.0.0
Call Pangea API
Use this action to call a Pangea API. To use this action, a Pangea account is required.
To get a Pangea account Sign up for free
How it works
Pangea is a collection of security services, all API-based, that can quickly and easily be added to any cloud application, embedded in the runtime code. Pangea provides app builders with a wide selection of security services to enable easily embedding security into their applications. Similar in nature to AWS for Compute APIs, Twilio for Communications APIs, or Stripe for Billing APIs, now there is Pangea for Security APIs.
Set up Pangea
To configure Pangea:
- Configure Pangea services as needed following the configuration guide.
- When you create your token in the guide, make sure it has access to your service
- Save your Pangea token and Pangea domain as secrets in your github repo /settings/secrets/actions
Inputs
There are three required input parameters:
- The Pangea api endpoint to call
- Endpoints need to be in the format "service.endpoint" as shown in the Javascript SDK (e.g. "audit.log")
- The API payload for that endpoint
- The payload needs to be json that can be parsed by the JSON.parse() method
- The Pangea token that has access to the service
- The Pangea domain for your service
with:
endpoint: "audit.log"
payload: "{\"message\": \"Call the Pangea Audit Log to Test\"}"
token: ${{secrets.PANGEA_TOKEN}}
domain: ${{secrets.PANGEA_DOMAIN}}
Usage
Minimal example
name: "Log Pull Request"
on:
pull_request:
types: [opened]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: pangeacyber/pangea-github-action-api@1.0.0
with:
endpoint: "audit.log"
payload: "{\"message\": \"New pull request was opened for ${{github.repository}}\"}"
token: ${{secrets.PANGEA_TOKEN}}
domain: ${{secrets.PANGEA_DOMAIN}}