mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Include testing the remote validator in itests
This commit is contained in:
parent
78d8b89aca
commit
a899376b8c
2 changed files with 28 additions and 0 deletions
|
|
@ -104,6 +104,9 @@ curl https://localhost:8443/cgi-bin/csaf_provider.go/create --cert-type p12 --ce
|
|||
|
||||
popd
|
||||
|
||||
# Setup validation service
|
||||
./setupValidationService.sh
|
||||
|
||||
# Upload files
|
||||
./uploadToProvider.sh
|
||||
|
||||
|
|
|
|||
25
docs/scripts/setupValidationService.sh
Normal file
25
docs/scripts/setupValidationService.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
mkdir -p /var/lib/csaf
|
||||
sudo chgrp www-data /var/lib/csaf/
|
||||
sudo chmod g+s /var/lib/csaf/
|
||||
sudo touch /var/lib/csaf/validations.db
|
||||
sudo chgrp www-data /var/lib/csaf/validations.db
|
||||
sudo chmod g+rw,o-rwx /var/lib/csaf/validations.db
|
||||
|
||||
echo '
|
||||
remote_validator= { "url" = "http://localhost:3000", "presets" = ["mandatory"], "cache" = "/var/lib/csaf/validations.db" }
|
||||
' | sudo tee --append /usr/lib/csaf/config.toml
|
||||
|
||||
# Install nodejs
|
||||
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
sudo apt-get install -y nodejs
|
||||
|
||||
npm install pm2 -g
|
||||
|
||||
pushd ~
|
||||
git clone https://github.com/secvisogram/csaf-validator-service.git
|
||||
cd csaf-validator-service
|
||||
npm ci
|
||||
pm2 start npm -- run dev
|
||||
popd
|
||||
Loading…
Add table
Add a link
Reference in a new issue