Skip to content

A GitHub Action for running GuardAI in GitHub Workflows.

License

Notifications You must be signed in to change notification settings

codeguardai/guardai-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

guardai-action

A GitHub Action for running GuardAI in GitHub Workflows

Inputs

name description required default
version

Version of GuardAI to install

false latest
provider

AI provider

true ""
model

AI model to use

false ""
directory

Directory to scan

false .
changes_only

Scan only changed files

false false
repo

GitHub repository

false ""
pr_number

Pull request number

false ""
github_token

GitHub API token

false ""
host

Custom AI server host

false ""
port

Custom AI server port

false ""
token

Token for authenticating with the custom AI server

false ""
endpoint

API endpoint for the custom server

false /api/v1/scan
output_file

Optional output file to store GuardAI results

false ""

Runs

This action is a composite action.

Usage

- uses: codeguardai/[email protected]
  env:
    # Optional: Environment variables required by the AI provider
    #
    # Set this if you are using OpenAI as the provider
    OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

    # Set this if you are using Gemini as the provider
    GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}

  with:
    version:
    # Version of GuardAI to install
    #
    # Required: false
    # Default: latest

    provider:
    # AI provider
    #
    # Required: true
    # Default: ""

    model:
    # AI model to use
    #
    # Required: false
    # Default: ""

    directory:
    # Directory to scan
    #
    # Required: false
    # Default: .

    changes_only:
    # Scan only changed files
    #
    # Required: false
    # Default: false

    repo:
    # GitHub repository
    #
    # Required: false
    # Default: ""

    pr_number:
    # Pull request number
    #
    # Required: false
    # Default: ""

    github_token:
    # GitHub API token
    #
    # Required: false
    # Default: ""

    host:
    # Custom AI server host
    #
    # Required: false
    # Default: ""

    port:
    # Custom AI server port
    #
    # Required: false
    # Default: ""

    token:
    # Token for authenticating with the custom AI server
    #
    # Required: false
    # Default: ""

    endpoint:
    # API endpoint for the custom server
    #
    # Required: false
    # Default: /api/v1/scan

    output_file:
    # Optional output file to store GuardAI results
    #
    # Required: false
    # Default: ""

About

A GitHub Action for running GuardAI in GitHub Workflows.

Resources

License

Stars

Watchers

Forks