Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
spectralops

GitHub Action

Spectral Scan

v1

Spectral Scan

spectralops

Spectral Scan

Automated Secrets, Misconfiguration, and IaC Misconfiguration detection by SpectralOps

Installation

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

              

- name: Spectral Scan

uses: SpectralOps/spectral-github-action@v1

Learn more about this action in SpectralOps/spectral-github-action

Choose a version



SpectralOps logo

Spectral Scan

Install Spectral Scan action

Spectral Scan is a single self-contained binary, that's easy to get and use. This action installs the latest Spectral version into your PATH.

Example usage

Include this Action as a step in your workflow:

uses: spectral/spectral-action@v1
with:
  spectral-dsn: ${{ secrets.SPECTRAL_DSN }}

You can see an example of this Action here

Configuration

You'll need to provide Spectral dsn. You can do so via the SPECTRAL_DSN environment variable. In the below example, the Spectral dsn is retrieved from GitHub secrets.

name: Example action

on: [push]

env:
  SPECTRAL_DSN: ${{ secrets.SPECTRAL_DSN }}

jobs:
  my-job:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Install Spectral
      uses: spectral/spectral-action@v1
      with:
        spectral-dsn: ${{ secrets.SPECTRAL_DSN }}
    - name: Spectral Scan
      run: spectral scan

How to Contribute

We welcome issues to and pull requests against this repository!

License

This project is licensed under the MIT License. See LICENSE for further details.