Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
3fb24d4
Update docker config and dev environment
GJFR Jul 3, 2025
660e529
Intermediary update
GJFR Jul 8, 2025
116171b
Fixes
GJFR Jul 8, 2025
5a1db62
Fixes
GJFR Jul 9, 2025
43b7c7e
Fixes and a lot of renaming
GJFR Jul 10, 2025
95b25ac
WIP: support for v8
GJFR Jul 11, 2025
a6dcaaf
Fixes
GJFR Jul 12, 2025
f3f3fa5
Fixes
GJFR Jul 14, 2025
cab4f4e
Add V8 per-experiment configuration options
GJFR Jul 15, 2025
55eb2a7
WIP: improve frontend
GJFR Jul 16, 2025
a981707
Add `bughog_unexpected_output` per-experiment option and various fixes
GJFR Jul 16, 2025
2058386
Fix multiple-experiment selection
GJFR Jul 17, 2025
19cbb02
Fix evaluation sequence and split sanity check from raw results
GJFR Jul 17, 2025
27e7b5b
Merge branch 'dev' into alpha
GJFR Jul 18, 2025
9234878
Update tests to new logic
GJFR Jul 18, 2025
dcb89ae
Improve consistency and fixes
GJFR Jul 18, 2025
62b41ac
Improve executable process handling, sanity checking and dev mode
GJFR Jul 22, 2025
b86ddd9
Gracefully handle executable error and streamline logging
GJFR Jul 23, 2025
4d8ea01
Fix state sequence algorithm edge case
GJFR Jul 24, 2025
ded869d
Fix integration tests and add new caching functionality
GJFR Jul 25, 2025
56fb2f8
Update poc editor
GJFR Sep 5, 2025
68f4412
Add artisanal executable and wasmtime support
GJFR Sep 8, 2025
9bbeed2
Add support for per subject worker images
GJFR Sep 12, 2025
abc097a
Fix experiment/project inconsistency and flaky websocket connection
GJFR Sep 17, 2025
454fa9b
Small refactor and improved error message
GJFR Sep 17, 2025
a0ac4ec
Make start button more responsive
GJFR Sep 17, 2025
015b93a
Improve UI and partially store evaluation parameters locally
GJFR Sep 19, 2025
2b58d6c
Fix missing parameters bug
GJFR Oct 15, 2025
05cb5a7
Redesign and fix browser pocs
GJFR Oct 18, 2025
a7de1c2
Fix several issues in browser evaluation and apply new structure to some
GJFR Oct 19, 2025
0d7c48f
Update node dependencies and vue configuration
GJFR Oct 19, 2025
c824959
Various fixes
GJFR Oct 20, 2025
47d703d
Fix several firefox bugs
GJFR Oct 20, 2025
95f5af2
Fix erroneous version slider
GJFR Oct 21, 2025
a025551
Fix misrepresentation of PoC editor
GJFR Oct 21, 2025
ff4484c
Fix update of project list after creating new project
GJFR Oct 23, 2025
b26b213
Add conventient url for web browser pocs
GJFR Oct 23, 2025
3cef19d
Fix experiments updating and poc-editor
GJFR Oct 24, 2025
2bebe70
Return projects in sorted order
GJFR Oct 24, 2025
690e4b2
Fix Gantt chart issue
GJFR Nov 3, 2025
f7321aa
Fix state retrieval and small improvements
GJFR Nov 3, 2025
aef70ec
Upgrade dependencies
GJFR Nov 3, 2025
3f426ff
Update github actions and devcontainer settings
GJFR Nov 4, 2025
a3de515
Cleanup uv dependencies
GJFR Nov 4, 2025
545c923
Refactor integration tests at /test
GJFR Nov 4, 2025
d6fcd6c
Rework sequence algorithm other improvements
GJFR Nov 7, 2025
9fd8bfd
Improve bgb search
GJFR Nov 8, 2025
d86b8b5
Clean up web browser experiments
GJFR Nov 8, 2025
d70507c
Fix 404 for poc index.html
GJFR Nov 8, 2025
d986751
Move poc parameter parsing to File class
GJFR Nov 9, 2025
1fe262f
Rework experiment file handling
GJFR Nov 9, 2025
201d4a9
WIP: Convert CSP pocs to new format
GJFR Nov 10, 2025
b5790c1
Move CSP pocs to new repo
GJFR Nov 11, 2025
df145ff
Fix .gitignore
GJFR Nov 11, 2025
026aaad
Mark Black Hat pocs as examples
GJFR Nov 11, 2025
51c099b
Clean web browser experiments
GJFR Nov 11, 2025
4b4cc0b
Fix executable caching bug
GJFR Nov 11, 2025
d52e4d2
Clean up js engine pocs
GJFR Nov 11, 2025
11fa1cc
Clean up js engine pocs
GJFR Nov 11, 2025
d81a6fa
Handle missing commit ids in plot factory
GJFR Nov 21, 2025
3c42402
Store more evaluation params and distinct for dev environment
GJFR Nov 21, 2025
91968e9
Redo dirty tests after every iteration to improve consistency
GJFR Nov 23, 2025
1bd3197
Download and extract executables to /dev/shm to reduce disk IO load
GJFR Nov 23, 2025
d2e1ea0
Fix LocalStorage boolean interpretation
GJFR Nov 23, 2025
8b56c09
Fix unsetting of project name after subject type change
GJFR Nov 24, 2025
6bf6792
Add --no-dev -and --locked flags to uv seync on container startup (#50)
JvHKuL Nov 27, 2025
f655af6
Improve efficiency and formatting
GJFR Jan 9, 2026
fc784d6
WIP: Add bughog service api and other changes
GJFR Jan 12, 2026
713e452
Fix .env typo and add sanity check to JS engine experiments
GJFR Jan 12, 2026
62b0ca0
Fix executable mongodb cache index
GJFR Jan 12, 2026
e1d081b
Hide docker logs and add TODO for container timeout
GJFR Jan 13, 2026
623a03f
Update default BUGHOG_SERVICE_API to public url
GJFR Jan 20, 2026
62b5d6d
Add toast notifications for user errors
GJFR Jan 20, 2026
a8e8557
Improve RAM usage for executable fetching and running
GJFR Jan 20, 2026
41ba1ed
Fix bug where /app/subject does not exist in unit tests
GJFR Jan 20, 2026
e698c3d
Plot experiments automatically if one is selected
GJFR Jan 20, 2026
643f502
Improve error handling
GJFR Jan 20, 2026
d9d5fc0
Update uv dependencies
GJFR Jan 20, 2026
eca3a77
Update node dependencies
GJFR Jan 20, 2026
ab854ef
Fix bughog var parsing issue and too early notification
GJFR Jan 20, 2026
d0e6fba
Small fixes and improve logging / notifications
GJFR Jan 20, 2026
329b60a
Performance and usability improvements
GJFR Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 11 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{
"name": "Development",
"name": "bughog-devcontainer",

// Update the 'dockerComposeFile' list if you have more compose files or use different names.
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
Expand All @@ -14,12 +14,20 @@
"service": "core_dev",
"runServices": ["node_dev", "nginx_dev"],

"containerEnv": {
"UV_PROJECT_ENVIRONMENT": "/app/.venv"
},

// The optional 'workspaceFolder' property is the path VS Code should open by default when
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
"workspaceFolder": "/app",
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/app/.venv/bin/python"
},
"extensions": [
"astral-sh.ty",
"charliermarsh.ruff",
"ms-python.debugpy",
"ms-python.python",
Expand All @@ -28,8 +36,7 @@
}
},

// Install pip requirements
"postCreateCommand": "pip install -r requirements.txt"
"postCreateCommand": "uv sync --dev --locked",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
Expand All @@ -38,7 +45,7 @@
// "forwardPorts": [],

// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",
"shutdownAction": "stopCompose",

// Configure tool-specific properties.
// "customizations": {},
Expand Down
69 changes: 33 additions & 36 deletions .github/workflows/run-tests-and-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,65 @@ on: [push]
jobs:
pytest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Cache Python dependencies
id: cache-pip
uses: actions/cache@v3
env:
cache-name: cache-python-dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/requirements_dev.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up Python 3.11
uses: actions/setup-python@v4
- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
enable-cache: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
pip install genbadge[all]
- name: Test with pytest
run: |
pytest --ignore=test/availability
run: uv sync --dev --locked

- name: Run pytest
run: uv run pytest --ignore=test/availability

- name: Generate badge
run: |
genbadge tests -i junit.xml -o pytest.svg
genbadge coverage -i coverage.xml -o coverage.svg
- name: Upload tests badge as artifact
uv run genbadge tests -i junit.xml -o pytest.svg
uv run genbadge coverage -i coverage.xml -o coverage.svg

- name: Upload test badge
uses: actions/upload-artifact@v4
with:
name: pytest
path: pytest.svg
overwrite: true
- name: Upload coverage badge as artifact

- name: Upload coverage badge
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.svg
overwrite: true


flake8:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11"
enable-cache: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 genbadge[all]
uv sync --dev --locked

- name: Lint with flake8
run: |
flake8 --exit-zero --output-file flake8.txt
uv run flake8 --exit-zero --output-file flake8.txt

- name: Generate badge
run: |
genbadge flake8 -i flake8.txt -o flake8.svg
- name: Upload badge with GitHub pages
uv run genbadge flake8 -i flake8.txt -o flake8.svg

- name: Upload badge
uses: actions/upload-artifact@v4
with:
name: flake8
Expand Down
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
test/resources/repositories
browser/binaries/
database/data/

nginx/ssl/certs/*
nginx/ssl/keys/*

subject/*/executables/*

subject/*/experiments/*
!subject/*/experiments/_default_files/
!subject/*/experiments/_tests/
!subject/*/experiments/examples/

!**/.gitkeep
**/node_modules
**/junit.xml
Expand Down
6 changes: 4 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"name": "BugHog",
"type": "debugpy",
"request": "launch",
"program": "/app/bci/app.py",
"program": "${workspaceFolder}/bughog/app.py",
"python": "${workspaceFolder}/.venv/bin/python",
"cwd": "${workspaceFolder}",
"purpose": [
"debug-test"
],
"env": {
"PYTHONPATH": "/app",
"PYTHONPATH": "${workspaceFolder}",
"DISPLAY": ":1",
"MOZ_DISABLE_CONTENT_SANDBOX": "1",
"PATH":"${PATH}:$HOME/.local/bin"
Expand Down
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"python.defaultInterpreterPath": "/app/.venv/bin/python",
"python.testing.pytestArgs": [
"test"
],
Expand Down
34 changes: 13 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:22.14-alpine AS ui-build-stage
WORKDIR /app
COPY /bci/web/vue/package*.json ./
COPY /bughog/web/vue/package*.json ./
RUN npm install
COPY /bci/web/vue ./
COPY /bughog/web/vue ./
RUN npm run build


Expand All @@ -21,10 +21,11 @@ CMD ["start.sh"]


FROM python:3.13-slim-bullseye AS base
COPY --from=ghcr.io/astral-sh/uv:0.9.7 /uv /uvx /bin/
WORKDIR /app

RUN apt-get update
RUN apt install -y curl gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libnspr4 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils libgbm-dev xvfb dbus-x11 libnss3-tools python3-pip python3-tk python3-xlib gnome-screenshot vim git procps &&\
RUN apt install -y curl gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libnspr4 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils libgbm-dev xvfb dbus-x11 libnss3-tools python3-tk python3-xlib gnome-screenshot vim git procps &&\
rm -rf /var/lib/apt/lists/*

# Install Docker
Expand Down Expand Up @@ -53,37 +54,28 @@ RUN curl -sSLo multiarch-support.deb https://snapshot.debian.org/archive/debian-
ln -s /usr/lib/x86_64-linux-gnu/libplc4.so /usr/lib/x86_64-linux-gnu/libplc4.so.0d &&\
ln -s /usr/lib/x86_64-linux-gnu/libnspr4.so /usr/lib/x86_64-linux-gnu/libnspr4.so.0d

RUN mkdir -p /app/logs && \
mkdir -p /app/browser/binaries/chromium/downloaded && \
mkdir -p /app/browser/binaries/firefox/downloaded && \
mkdir -p /app/browser/binaries/chromium/artisanal && \
mkdir -p /app/browser/binaries/firefox/artisanal

COPY browser/profiles /app/browser/profiles
COPY subject/web_browser/profiles /app/subject/web_browser/profiles
COPY --chmod=0755 scripts/ /app/scripts/
RUN cp /app/scripts/daemon/xvfb /etc/init.d/xvfb
RUN cp /app/scripts/daemon/xvfb /etc/init.d/xvfb &&\
mkdir -p /app/logs

# Install python packages
COPY requirements.txt /app/requirements.txt
RUN pip install --user -r /app/requirements.txt
COPY pyproject.toml uv.lock /app/
RUN uv sync --no-dev --locked
ENV PATH="/app/.venv/bin:$PATH"

# Initiate PyAutoGUI
RUN touch /root/.Xauthority && \
xauth add ${HOST}:0 . $(xxd -l 16 -p /dev/urandom)


FROM base AS core
# Copy rest of source code
COPY bci /app/bci
COPY bughog /app/bughog
ENTRYPOINT [ "/app/scripts/boot/core.sh" ]


FROM base AS worker
# Copy rest of source code
COPY bci /app/bci
COPY bughog /app/bughog
ENTRYPOINT [ "/app/scripts/boot/worker.sh" ]


FROM base AS dev
COPY requirements_dev.txt /app/requirements_dev.txt
RUN pip install --user -r requirements_dev.txt
ENTRYPOINT [ "/app/scripts/boot/core.sh" ]
73 changes: 0 additions & 73 deletions bci/analysis/plot_factory.py

This file was deleted.

41 changes: 0 additions & 41 deletions bci/browser/automation/terminal.py

This file was deleted.

Loading