From af41be0eb67a07d4ae6a3abffe4e2c68d5965834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20B=C3=BClow?= Date: Fri, 13 Jun 2025 18:59:40 +0200 Subject: [PATCH] adding makefile entries for capa and ole scanners, updating go metadata --- Makefile | 14 +++++++++++++- go.mod | 3 +-- go.sum | 2 -- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 239dfc7..760747c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ all: deps build deps: ## Install build dependencies go mod tidy - go install github.com/a-h/templ/cmd/templ@latest + test -d venv || python3 -m venv venv + . ./venv/bin/activate; pip install -r ./scanners/ole/requirements.txt; pip install -r ./scanners/capa/requirements.txt build: ## Build and compile echo "Building..." @@ -34,6 +35,17 @@ templ-dev: ## Watch & Live rebuild of templ tailwind-dev: ##Live rebuild of tailwind tailwindcss -o server/web/assets/styles.css -i input.css --watch +ole-dev: ##Live rebouild of ole-scanner + . ./venv/bin/activate; \ + cd ./scanners/ole; \ + FILE_DIRECTORY="$(shell pwd)/storage/files" flask run -p5000 + +capa-dev: ##Live rebouild of ole-scanner + . ./venv/bin/activate; \ + cd ./scanners/capa; \ + FILE_DIRECTORY="$(shell pwd)/storage/files" flask run -p5001 + + # Live Reload watch: ##Live reload with air @if command -v air > /dev/null; then \ diff --git a/go.mod b/go.mod index cfa8da2..4b1a571 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ go 1.24.1 require ( github.com/Oudwins/tailwind-merge-go v0.2.1 github.com/a-h/templ v0.3.865 + github.com/gabriel-vasile/mimetype v1.4.9 github.com/gorilla/securecookie v1.1.2 github.com/gorilla/sessions v1.4.0 - github.com/h2non/filetype v1.1.3 github.com/jackc/pgx/v5 v5.7.5 github.com/joho/godotenv v1.5.1 github.com/lib/pq v1.10.9 @@ -17,7 +17,6 @@ require ( require ( github.com/fsnotify/fsnotify v1.9.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.9 // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect diff --git a/go.sum b/go.sum index 1e0bf65..695246c 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,6 @@ github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kX github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ= github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik= -github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= -github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=