Skip to content

Commit

Permalink
Fix readme typos (#535)
Browse files Browse the repository at this point in the history
* fix #530 by fixing the readme typo

* fix #529 by updating the docs to remove dependency of in-repo db
  • Loading branch information
northdpole authored Jul 21, 2024
1 parent 0f3f166 commit 1437e42
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
<pre>git clone https://github.com/OWASP/common-requirement-enumeration </pre>

Copy sqlite database to required location
<pre>cp cres/db.sqlite standards_cache.sqlite</pre>

Install dependencies
<pre> make install </pre>


# 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:
<pre>git clone https://github.com/OWASP/common-requirement-enumeration </pre>

* Install dependencies
<pre> make install </pre>

* Download the latest CRE graph from upstream by running
<pre>python cre.py --upstream_sync</pre>
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
<pre>python cre.py --help</pre>

Expand Down

0 comments on commit 1437e42

Please sign in to comment.