Documentation

Getting started with Firmlint

Everything you need to run your first analysis. 10 minutes start to finish.

On this page

Requirements

No cloud account needed. Firmlint runs entirely on your machine. No code leaves your workstation in the default configuration.

1 · Install the Docker image

Pull the image from GitHub Container Registry:

$ docker pull ghcr.io/ibrarmohammed1137/misra-assistant:latest

The image is public — no login required. Expect ~500 MB download.

2 · Run your first analysis

From your project directory, mount the current folder and pass a file to analyze:

$ docker run --rm -v "$(pwd):/app" -w /app \
    ghcr.io/ibrarmohammed1137/misra-assistant:latest \
    python -m agent.run samples/demo.cpp --standard autosar-cpp14

What the flags mean:

After the run, look in ./out/. You'll find:

Dry run first? Add --dry-run to see what would be analyzed without running the full analysis.

3 · Reading the report

Open out/report.html in any browser. You'll see:

Fixes verified: 0 is not an error. It means the tool did not find a fix it could verify. The tool will not claim verified work it hasn't actually verified.

4 · Choosing a standard

Pass --standard to pick a rule set:

--standard misra-c-2012       MISRA C:2012
--standard misra-cpp-2023     MISRA C++:2023
--standard autosar-cpp14      AUTOSAR C++14
--standard cert-c             CERT C
--standard cwe-top-25         CWE Top 25

Run without --standard to use the default (MISRA C:2012 for .c files, AUTOSAR C++14 for .cpp files).

5 · Enabling local AI (optional)

The deterministic layer (cppcheck, clang-tidy) works without any AI. To enable the AI explanations with local inference:

  1. Install Ollama on your host machine
  2. Pull a model: ollama pull qwen2.5-coder:14b
  3. Run the container with Ollama access:
    $ docker run --rm -v "$(pwd):/app" -w /app \
        --add-host=host.docker.internal:host-gateway \
        -e OLLAMA_HOST=http://host.docker.internal:11434 \
        ghcr.io/ibrarmohammed1137/misra-assistant:latest \
        python -m agent.run samples/demo.cpp --standard autosar-cpp14

Your code still never leaves your machine — only local inference is used.

6 · CI/CD integration

Add this step to your pipeline (GitHub Actions example):

- name: Firmlint
  run: |
    docker pull ghcr.io/ibrarmohammed1137/misra-assistant:latest
    docker run --rm -v "$PWD:/app" -w /app \
      ghcr.io/ibrarmohammed1137/misra-assistant:latest \
      python -m agent.run src/ --standard misra-c-2012

- name: Upload report
  uses: actions/upload-artifact@v4
  with:
    name: firmlint-report
    path: out/

The SARIF output (out/report.sarif) can be uploaded to GitHub's code-scanning tab directly.

Troubleshooting

Docker says "denied: denied"

Your Docker daemon isn't authenticated to GHCR. Log out and pull again:

$ docker logout ghcr.io
$ docker pull ghcr.io/ibrarmohammed1137/misra-assistant:latest

Report has 0 findings but code should have violations

Check the "Coverage" section in the report. It lists which rules fired. If your rule isn't in the rule database, it isn't checked. Partial coverage is expected — see the Limitations section.

AI explanations are missing

The AI layer is optional. If Ollama isn't running or reachable, findings will show the analyzer message but no explanation. See §5 to enable it.

Container can't see my files

Check the volume mount. On Windows, use $(pwd) in Git Bash or ${PWD} in PowerShell. The path must be absolute.

Still stuck?

Email hello@firmlint.com with:

We answer within one business day.