Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 51 additions & 64 deletions .github/workflows/integrate.yml → .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,85 @@
name: Integrate
---
name: check

on:
push:
branches: [ "**" ]
paths:
- "emass/**"
- "tools/**"
- "agent/**"
- "backend/**"
- "fastmcp/**"
- "frontend/**"
- "docs/**"

jobs:
secrets:
name: Secrets Check
code-lint:
name: Code Lint Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- backend
- fastmcp
- frontend
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Run Trufflehog
id: trufflehog
uses: trufflesecurity/trufflehog@main
continue-on-error: false
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: python -m pip install black
- name: Check code formatting
run: black --diff --color --check ${{ matrix.container }}

dockerfile:
dockerfile-link:
name: Dockerfile Lint Check
needs: secrets
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- emass
- tools
- agent/openai_gpt-4o
- backend
- fastmcp
- frontend
- docs
steps:
- uses: actions/checkout@v4
- uses: hadolint/hadolint-action@v3.1.0
with:
failure-threshold: error
dockerfile: ${{ matrix.container }}/Dockerfile

qa:
name: Quality Assurance Check
needs: secrets
secrets:
name: Secrets Scan
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v6
- name: Run Trufflehog
id: trufflehog
uses: trufflesecurity/trufflehog@main
continue-on-error: false

sast:
name: SAST Scan
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- emass
- tools
- agent/openai_gpt-4o
- backend
- fastmcp
- frontend
- docs
container:
image: semgrep/semgrep
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Python dependencies
run: python -m pip install black
- name: Check code formatting
run: black --diff --color --check ${{ matrix.container }}
uses: actions/checkout@v6
- name: Run Semgrep
run: semgrep scan --config auto ${{ matrix.container }}

sca:
name: Software Composition Analysis
needs: secrets
name: SBOM Scan
runs-on: ubuntu-latest
permissions:
actions: read
Expand All @@ -78,42 +88,19 @@ jobs:
fail-fast: false
matrix:
container:
- emass
- tools
- agent/openai_gpt-4o
- backend
- fastmcp
- frontend
- docs
steps:
- uses: actions/checkout@v4
- name: Generate an SBOM
- uses: actions/checkout@v6
- name: Run Syft
uses: anchore/sbom-action@v0
with:
path: ${{ matrix.container }}
output-file: sbom-${{ matrix.container }}.json
artifact-name: sbom-${{ matrix.container }}
- name: Check for CVEs
uses: anchore/scan-action@v3
- name: Run Grype
uses: anchore/scan-action@v7
with:
sbom: sbom-${{ matrix.container }}.json
severity-cutoff: high

sast:
name: Static App Security Test
needs: secrets
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- emass
- tools
- agent/openai_gpt-4o
- frontend
- docs
container:
image: semgrep/semgrep
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Perform a SAST scan
run: semgrep scan --config auto ${{ matrix.container }}
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Docs

on:
push:
branches: [ "**" ]
paths:
- "docs/**"

Expand All @@ -13,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install Python
uses: actions/setup-python@v5
with:
Expand Down
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ DOCKER_COMPOSE_PROFILE ?= all
.SILENT: build

build:
docker compose --profile $(DOCKER_COMPOSE_PROFILE) build
docker compose --profile $(DOCKER_COMPOSE_PROFILE) build

# ---------------------------------------------------------
# Start the containers.
Expand All @@ -29,7 +29,7 @@ build:
.SILENT: start

start:
docker compose --profile $(DOCKER_COMPOSE_PROFILE) up -d
docker compose --profile $(DOCKER_COMPOSE_PROFILE) up -d

# ---------------------------------------------------------
# Stop the containers.
Expand All @@ -39,14 +39,13 @@ start:
.SILENT: stop

stop:
docker compose --profile $(DOCKER_COMPOSE_PROFILE) down
docker compose --profile $(DOCKER_COMPOSE_PROFILE) down

# ---------------------------------------------------------
# Test the agent.
# Check the status of the containers.
# ---------------------------------------------------------

.PHONY: test/agent
.SILENT: test/agent

test/agent:
curl -X POST localhost:8181/api/v1/ -d '{"message":"hello"}'; echo
.PHONY: status
.SILENT: status

status:
docker compose --profile $(DOCKER_COMPOSE_PROFILE) ps --format "table {{.Name}}\t{{.Ports}}\t{{.Status}}"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# `swordfish`
For more information, [read the docs](https://deathlabs.github.io/swordfish/)!
Swordfish is an AI assistant for automating eMASS records management.
4 changes: 0 additions & 4 deletions agent/aoai_gpt-4o/entrypoint.sh

This file was deleted.

49 changes: 0 additions & 49 deletions agent/aoai_gpt-4o/swordfish/main.py

This file was deleted.

14 changes: 0 additions & 14 deletions agent/openai_gpt-4o/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions agent/openai_gpt-4o/entrypoint.sh

This file was deleted.

7 changes: 0 additions & 7 deletions agent/openai_gpt-4o/requirements.txt

This file was deleted.

22 changes: 0 additions & 22 deletions agent/openai_gpt-4o/swordfish/history.py

This file was deleted.

Loading
Loading