Skip to main content
Glama
security.ymlโ€ข4.13 kB
name: ๐Ÿ”’ Security & Quality on: pull_request: branches: [ master, main ] schedule: # Run weekly security scans - cron: '0 6 * * 1' permissions: contents: read security-events: write actions: read jobs: security-scan: name: ๐Ÿ” Security Scan runs-on: ubuntu-latest steps: - name: ๐Ÿ“ฅ Checkout uses: actions/checkout@v4 - name: ๐Ÿ”’ Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: scan-type: 'fs' scan-ref: '.' format: 'sarif' output: 'trivy-results.sarif' - name: ๐Ÿ“ค Upload Trivy scan results to GitHub Security uses: github/codeql-action/upload-sarif@v3 if: always() with: sarif_file: 'trivy-results.sarif' category: 'trivy-filesystem' - name: ๐Ÿณ Build Docker image for security scan if: github.event_name != 'schedule' run: | docker build -t security-scan-image . - name: ๐Ÿ”’ Run Trivy on Docker image if: github.event_name != 'schedule' uses: aquasecurity/trivy-action@master with: image-ref: 'security-scan-image' format: 'sarif' output: 'trivy-docker-results.sarif' - name: ๐Ÿ“ค Upload Docker scan results uses: github/codeql-action/upload-sarif@v3 if: always() && github.event_name != 'schedule' with: sarif_file: 'trivy-docker-results.sarif' category: 'trivy-docker' dependency-check: name: ๐Ÿ“ฆ Dependency Check runs-on: ubuntu-latest steps: - name: ๐Ÿ“ฅ Checkout uses: actions/checkout@v4 - name: ๐Ÿ“ฆ Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: ๐Ÿ“ฅ Install dependencies run: npm ci - name: ๐Ÿ” Audit dependencies # Using audit-ci for allowlisting, npm audit for basic check (non-blocking) run: npm audit --audit-level=moderate || true - name: ๐Ÿ“Š Check for outdated packages run: npm outdated || true - name: ๐Ÿ”’ Check for known vulnerabilities # audit-ci respects allowlist in audit-ci.json for false positives run: npx audit-ci --config audit-ci.json dockerfile-lint: name: ๐Ÿณ Dockerfile Lint runs-on: ubuntu-latest steps: - name: ๐Ÿ“ฅ Checkout uses: actions/checkout@v4 - name: ๐Ÿ” Lint Dockerfile uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: Dockerfile format: sarif output-file: hadolint-results.sarif no-fail: true - name: ๐Ÿ“ค Upload Dockerfile lint results uses: github/codeql-action/upload-sarif@v3 if: always() with: sarif_file: hadolint-results.sarif category: 'hadolint' quality-gates: name: ๐Ÿš€ Quality Gates runs-on: ubuntu-latest needs: [security-scan, dependency-check, dockerfile-lint] if: always() steps: - name: ๐Ÿ“Š Quality Gate Summary run: | echo "## ๐Ÿ”’ Security & Quality Report" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY if [ "${{ needs.security-scan.result }}" == "success" ]; then echo "โœ… **Security Scan:** Passed" >> $GITHUB_STEP_SUMMARY else echo "โŒ **Security Scan:** Failed" >> $GITHUB_STEP_SUMMARY fi if [ "${{ needs.dependency-check.result }}" == "success" ]; then echo "โœ… **Dependency Check:** Passed" >> $GITHUB_STEP_SUMMARY else echo "โŒ **Dependency Check:** Failed" >> $GITHUB_STEP_SUMMARY fi if [ "${{ needs.dockerfile-lint.result }}" == "success" ]; then echo "โœ… **Dockerfile Lint:** Passed" >> $GITHUB_STEP_SUMMARY else echo "โŒ **Dockerfile Lint:** Failed" >> $GITHUB_STEP_SUMMARY fi echo "" >> $GITHUB_STEP_SUMMARY echo "๐Ÿ“‹ **View detailed results in the Security tab**" >> $GITHUB_STEP_SUMMARY

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nesquikm/mcp-rubber-duck'

If you have feedback or need assistance with the MCP directory API, please join our Discord server