GitHub Integration Tutorial

Learn how to connect open-source tools with your GitHub workflow using elsia's automation capabilities.

Table of Contents

1

Setup Requirements

Install necessary tools and configure your environment for GitHub integration.

2

CLI Configuration

Learn how to setup and use the CLI for GitHub project management.

3

Security Scans

Run vulnerability analyses on your repositories using our security tools.

4

Workflow Automation

Automate your CI/CD pipelines with elsia's GitHub integration features.

1. Setup Requirements

1

Install the CLI

Begin by installing the command-line utility that powers our GitHub integration.

npm install -g @elsia/cli@latest
2

Configure GitHub Auth

Set up GitHub authentication to allow API access to your repositories.

elsia config set github.token YOUR_GITHUB_TOKEN
// Optional: Verify authentication elsia auth test // Expected output { "status": "authenticated", "account": "github-username", "api_limit": 5000 }

3. Run Security Scans

Security Best Practices

Step 1: Run a Scan

elsia scan repo https://github.com/username/repo

This will analyze dependency trees and detect vulnerabilities.

Step 2: View Report

{ "total_vulnerabilities": 3, "high_severity": 1, "url": "https://elsia.security/reports/abcd1234" }

Access the full report in your browser.

Step 3: Fix Issues

elsia fix apply https://elsia.security/report/abcd1234

Automatically applies security patches to your repository.

4. Workflow Automation

1

Create GitHub Actions

Automate security scans and dependency updates using elsia's workflow templates.

.github/workflows/elsia-scan.yml
name: Dependency Scan
on: [push, schedule]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: elsia scan repo https://github.com/username/repo
      - run: curl -o report.html https://elsia.security/reports/abcd1234
2

Integrate with CI/CD

Add automated steps to fail builds if security issues are found.

.github/workflows/elsia-cd.yml
jobs:
  deploy-check:
    steps:
      - run: |
          elsia scan repo https://github.com/username/repo
          exit_code=$?
          if [ $exit_code != 0 ]; then
            echo "Security issues found, build failed"
            exit 1
          fi

Next Steps

Continue to API documentation
View API Reference