Skip to content
terminal

GitHub Action

StackSpot AI Remote Quick Command Action

v1 Latest version

StackSpot AI Remote Quick Command Action

terminal

StackSpot AI Remote Quick Command Action

StackSpot AI Remote Quick Command Action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: StackSpot AI Remote Quick Command Action

uses: GuillaumeFalourd/stackspot-ai-rqc@v1

Learn more about this action in GuillaumeFalourd/stackspot-ai-rqc

Choose a version

stackspot-ai-rqc

Daily action Test Action Test Ubuntu Action Test MacOS Action Test Windows

StackSpot AI Remote Quick Command Action

This action forwards an input_data to a StackSpot AI remote quick command and returns a JSON as answer (github action output) to be manipulated in future steps for customizable operations.

Note: This action is supported on all operating systems.

⚠️ Prompt configuration (mandatory requirement)

For this action to work, be sure you configured your Remote Quick Command prompt on StackSpot AI with a JSON object as output.

Example (cf test pipelines above):

Check security vulnerabilities describe the vulnerabilities and fix the selected code {{input_data}}

Your answer should just be following the JSON structure below:

[
  {
    "title": "<TITLE>",
    "severity": "<SEVERITY>",
    "correction": "<CORRECTION>"
  }
]

Where the "title" would be a string resuming the vulnerability in 15 words maximum.

Where the "severity" would be a string representing the impact of the vulnerability, using critical, high, medium or low.

Where the "correction" would be a code suggestion to resolve the issue identified.

📚 Usage

steps:
    - uses: actions/checkout@v4

    - name: Save test data
      id: input_data
      run: |
       # something to generate an $input_data

    - uses: GuillaumeFalourd/stackspot-ai-rqc@v1
      id: rqc
      with:
        CLIENT_ID: ${{ secrets.CLIENT_ID }}
        CLIENT_KEY: ${{ secrets.CLIENT_KEY }}
        CLIENT_REALM: ${{ secrets.CLIENT_REALM }}
        QC_SLUG: YOUR_REMOTE_QUICK_COMMAND_SLUG
        INPUT_DATA: ${{ steps.input_data.outputs.<OUTPUT_NAME> }}

    - name: Check Remote Quick Command answer
      run: echo ${{ toJSON(steps.rqc.outputs.rqc_result) }}

▶️ Action Inputs

Field Mandatory Default Value Observation
CLIENT_ID YES N/A StackSpot Client ID.
CLIENT_KEY YES N/A StackSpot Client KEY.
CLIENT_REALM YES N/A StackSpot Client Realm.
QC_SLUG YES N/A StackSpot Remote Quick Command reference
INPUT_DATA YES N/A Data that will be received and analyzed by the remote quick command

▶️ Action Output

Field Observation
rqc_result Can be accessed by using ${{ toJSON(steps.rqc.outputs.rqc_result) }}

🤝 Contributing

Guidelines

🏅 Licensed

☞ This repository uses the Apache License 2.0