Skip to main content

Quickstart

Get your first scan running in under 10 minutes.

Prerequisites

  • A Musha account with an active trial or subscription (sign up)
  • A repository hosted on GitHub, GitLab, Azure DevOps, or Bitbucket
  • Admin access to the repository (to configure the CI pipeline)

Step 1 — Create a project

  1. Open app.mushasec.com and go to Projects.
  2. Click New project.
  3. Enter a name and the repository URL (e.g. https://github.com/acme/backend-api).
  4. Select the platform (GitHub, GitLab, Azure DevOps, or Bitbucket).
  5. Connect your OAuth integration in Settings → Integrations if you haven't already — Musha needs read access to clone the repo.

Step 2 — Create an API key

  1. Go to Settings → API Keys.
  2. Click New API key, give it a name (e.g. ci-prod), and set an expiry date.
  3. Copy the key immediately — it is shown only once.
  4. Store it as a secret in your CI platform:
    • GitHub: Settings → Secrets and variables → Actions → New secret
    • GitLab: Settings → CI/CD → Variables
    • Azure DevOps: Pipelines → Library → + Variable group
    • Bitbucket: Repository settings → Repository variables

Step 3 — Add the CI workflow

Add the following to your repository. Choose the tab for your platform:

Create .github/workflows/musha.yml:

name: Musha Security Scan

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

jobs:
musha-scan:
name: Security scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Package files
run: tar -czf scan.tar.gz --exclude='.git' --exclude='node_modules' --exclude='vendor' .

- name: Upload to Musha
run: |
curl -fsS -X POST "${{ vars.MUSHA_API_URL }}/v1/scans" \
-H "Authorization: Bearer ${{ secrets.MUSHA_API_KEY }}" \
-F "files=@scan.tar.gz" \
-F "project_id=${{ vars.MUSHA_PROJECT_ID }}" \
-F "branch=${{ github.head_ref || github.ref_name }}" \
-F "pr_id=${{ github.event.pull_request.number }}" \
-F "commit_hash=${{ github.sha }}" \
-F "scan_type=full"

Required variables

VariableWhere to set itExample
MUSHA_API_URLCI variable (not secret)https://api.mushasec.com
MUSHA_API_KEYCI secretmsk_live_...
MUSHA_PROJECT_IDCI variable (not secret)01960000-...

Your Project ID is visible in the project detail page URL: app.mushasec.com/projects → click the project.


Step 4 — Push and verify

Push a commit (or open a PR). Within 60–90 seconds:

  • The scan appears in Repo Scans with status completed.
  • If it's a PR, a comment is posted to the PR with a pass/fail summary.
  • Any findings appear in the Security dashboard.

If the scan stays in pending for more than 2 minutes, see Troubleshooting.


Next steps