Automate Continuous Surveys

Navigate from manual complexity to automated clarity. Integrate Spice Labs into your GitHub workflows to continuously survey your code on every push, pull request, or release - ensuring your software landscape remains mapped and secure.

Deploy Continuous Intelligence

Chart your path to automated surveys:

name: Spice Labs Security Scan

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  security-scan:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Run Spice Labs Survey
        uses: spice-labs-inc/action-spice-labs-surveyor@v4
        with:
          spice_pass: ${{ secrets.SPICE_PASS }}
          input: ./
          tag: "my-project"

Setup Steps

1. Add Your Spice Pass Secret

  1. Go to your repository SettingsSecrets and VariablesActions
  2. Click New repository secret
  3. Name: SPICE_PASS
  4. Value: Your Spice Pass JWT from the dashboard
  5. Click Add secret

2. Create the Workflow File

Create .github/workflows/spice-survey.yml in your repository with the workflow above.

3. Commit and Push

git add .github/workflows/spice-survey.yml
git commit -m "Add Spice Labs security surveying"
git push

Watch the survey run automatically on your next push!

jobs:
  survey-frontend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: spice-labs-inc/action-spice-labs-surveyor@v4
        with:
          spice_pass: ${{ secrets.SPICE_PASS }}
          input: ./frontend
          tag: "frontend"

  survey-backend:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: spice-labs-inc/action-spice-labs-surveyor@v4
        with:
          spice_pass: ${{ secrets.SPICE_PASS }}
          input: ./backend
          tag: "backend"

Action Inputs Reference

InputDescriptionRequiredDefault
spice_passYour Spice Pass JWT token✅ Yes
inputDirectory or file to scanNo./
tagStable identifier for your project/repo/module✅ Yes

Troubleshooting

Common Issues

“Authentication failed”

# Check that SPICE_PASS secret is set correctly
# Verify token hasn't expired in dashboard

“No files found to scan”

# Verify the input exists
- name: Debug - List files
  run: ls -la ./

- name: Run scan
  uses: spice-labs-inc/action-spice-labs-surveyor@v4
  with:
    tag: "my-module"
    input: ./correct-path

Security Best Practices

  1. Use repository secrets for Spice Pass tokens
  2. Limit workflow permissions to minimum required:
    permissions:
      contents: read
  3. Use different spice passes for different environments
  4. Rotate spice passes regularly (every 90 days)
  5. Monitor workflow logs for security issues

💡 Navigate Complex Landscapes

For monorepos, chart individual components separately rather than the entire repository to achieve faster analysis and more precise intelligence.

ℹ️ Sample Project

Try the GitHub Action with our sample project to see it in action!