From 1437e42e85d7c7748415f692d42898d079a579c6 Mon Sep 17 00:00:00 2001 From: Spyros Date: Sun, 21 Jul 2024 14:00:42 +0100 Subject: [PATCH] Fix readme typos (#535) * fix #530 by fixing the readme typo * fix #529 by updating the docs to remove dependency of in-repo db --- .devcontainer/devcontainer.json | 2 +- Makefile | 8 +------- README.md | 29 ++++++++++++++--------------- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 68abd268a..6b2f4b3fe 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "storage": "32gb" }, "image": "mcr.microsoft.com/devcontainers/universal:2", - "postCreateCommand": "make install && make frontend && cp cres/db.sqlite standards_cache.sqlite", + "postCreateCommand": "make install && make frontend && python cre.py --upstream_sync", "extensions": [ "ms-python.vscode-pylance", "visualstudioexptteam.vscodeintellicode", diff --git a/Makefile b/Makefile index 5315b9c38..6af2db803 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ .PHONY: run test covers install-deps dev docker lint frontend clean all prod-run: - cp cres/db.sqlite standards_cache.sqlite; gunicorn cre:app --log-file=- + gunicorn cre:app --log-file=- docker-neo4j-rm: docker stop cre-neo4j @@ -99,12 +99,6 @@ clean: find . -type f -name '*.log' -delete find . -type f -name '*.orig' -delete -migrate-restore: - if ! [ -f "standards_cache.sqlite" ]; then cp cres/db.sqlite standards_cache.sqlite; fi - [ -d "./venv" ] && . ./venv/bin/activate &&\ - export FLASK_APP=$(CURDIR)/cre.py - flask db upgrade - migrate-upgrade: [ -d "./venv" ] && . ./venv/bin/activate &&\ export FLASK_APP=$(CURDIR)/cre.py diff --git a/README.md b/README.md index 94337486c..17ccae97c 100644 --- a/README.md +++ b/README.md @@ -31,31 +31,30 @@ Example: the session time-out topic will take the user to relevant criteria in s Some of the data has been kindly contributed by the SKF and ASVS projects -# Installing - - -To install this application you need python3, yarn and virtualenv. -Clone the repository: -
git clone https://github.com/OWASP/common-requirement-enumeration 
- -Copy sqlite database to required location -
cp cres/db.sqlite standards_cache.sqlite
- -Install dependencies -
 make install 
- - # Running ### Locally #### Docker -The easiest weay to run OpenCRE locally is by running the published docker container. +The easiest way to run OpenCRE locally is by running the published docker container. You can do so by running: `docker run -p 5000:5000 ghcr.io/owasp/opencre/opencre:latest` After the container has finished downloading the remote information you can access it in [localhost](http://127.0.0.1:5000) #### Command Line + +To run outside of Docker you need to install OpenCRE. +To install this application you need python3, yarn and virtualenv. +* Clone the repository: +
git clone https://github.com/OWASP/common-requirement-enumeration 
+ +* Install dependencies +
 make install 
+ +* Download the latest CRE graph from upstream by running +
python cre.py --upstream_sync
+Keep in mind that until [Issue #534](https://github.com/OWASP/OpenCRE/issues/534) is fixed you won't have access to gap analysis results locally + To run the CLI application, you can run
python cre.py --help