
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
[!NOTE]
This component is part of Repository Scanner - resc
The RESC-backend component includes database models, RESC Web service, Alembic scripts for database migration, RabbitMQ users, and queue creation.
These instructions will help you to get a copy of the project up and running on your local machine for development and testing purposes.
sudo apt install unixodbc-dev
pip install virtualenv
virtualenv venv
source venv/Scripts/activate
pip install pyodbc==4.0.32
pip install -e .
source db.env
export MSSQL_SCHEMA=master
export MSSQL_DB_PORT=30880
export MSSQL_PASSWORD="<enter password for local database>"
uvicorn resc_backend.resc_web_service.api:app --workers 1
Open http://127.0.0.1:8000 in a browser to access the API.
Note: This procedure has been only tested in Linux and Mac. It may not work in machines running the Apple M1 chip due to lack of support from MSSQL docker image.
Prerequisites:
make env
make db
This target will run a local MSSQL instance in a container called resc-db. It creates and populates the resc database schema using alembic and the sql script located in test_data/database_dummy_data.sql
Note:: This target will also try to remove the DB container if it already exists.
If you want to remove this container, run: make cleandb
make rws
Open http://127.0.0.1:1234 in a browser to access the API.
make clean
docker pull rescabnamro/resc-backend:latest
Alternatively, build the docker image locally by running following command:
Ensure resc database is up and running locally.
You can connect RESC web service to database, if you have already deployed RESC through helm in Kubernetes.
Open the Git Bash terminal from /components/resc-backend folder and run below commands.
Update MSSQL_PASSWORD value in the docker run command.
docker build -t rescabnamro/resc-backend:latest .
source db.env
docker run -p 8000:8000 -e DB_CONNECTION_STRING -e MSSQL_ODBC_DRIVER -e MSSQL_USERNAME -e RESC_REDIS_CACHE_ENABLE -e AUTHENTICATION_REQUIRED -e MSSQL_DB_HOST="host.docker.internal" -e MSSQL_PASSWORD="<enter password for local database>" -e MSSQL_SCHEMA="master" -e MSSQL_DB_PORT=30880 --name resc-backend rescabnamro/resc-backend:latest uvicorn resc_backend.resc_web_service.api:app --workers 1 --host 0.0.0.0 --port 8000
Open http://127.0.0.1:8000 in a browser to access the API.
See below commands for running various (unit/linting) tests locally. To run these tests you need to install tox. This can be done on Linux and Windows with Git Bash.
Run below commands to make sure that the unit tests are running and that the code matches quality standards:
pip install tox # install tox locally
tox -v -e lint # Run this command to lint the code according to this repository's standard
tox -v -e pytest # Run this command to run the unit tests
tox -v # Run this command to run all of the above tests
If you don't provide any argument to the script, then the default image value will be used
cd tests/newman_tests
./run_newman_tests.sh
If you can override the images by providing below arguments to the script.
cd tests/newman_tests
./run_newman_tests.sh -b <resc-backend image:tag> -d <resc-database image:tag> -n <newman image:tag>
Example: ./run_newman_tests.sh -b 'rescabnamro/resc-backend:latest' -d 'mcr.microsoft.com/azure-sql-edge:1.0.7' -n 'postman/newman:5.3.1-alpine'
If you don't provide any argument to the script, then the default image value will be used
cd tests/zap_tests
./run_run_zap_api_tests.sh
If you can override the images by providing below arguments to the script.
cd tests/zap_tests
./run_run_zap_api_tests.sh -b <resc-backend image:tag> -d <resc-database image:tag> -z <zap image:tag>
Example: ./run_newman_tests.sh -b 'rescabnamro/resc-backend:latest' -d 'mcr.microsoft.com/azure-sql-edge:1.0.7' -n 'owasp/zap2docker-weekly'
FAQs
Repository Scanner - Backend
We found that resc-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.