mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-01 17:12:21 +00:00
Update nodejs example (#449)
Update the express version to mitigate some security vulnerabilities. Update the port to match the one used by demo.yml. Change to /usr/src/app so npm install works as expected.
This commit is contained in:
parent
ef9c4ee6ab
commit
8c6ebd586d
@ -42,7 +42,7 @@ This starts the following containers:
|
||||
Run the following commands to execute arbitrary commands like 'ls', 'pwd', etc:
|
||||
|
||||
```
|
||||
$ curl http://localhost:8080/api/exec/ls
|
||||
$ curl http://localhost:8181/api/exec/ls
|
||||
|
||||
demo.yml
|
||||
node_modules
|
||||
@ -52,7 +52,7 @@ server.js
|
||||
```
|
||||
|
||||
```
|
||||
$ curl http://localhost:8080/api/exec/pwd
|
||||
$ curl http://localhost:8181/api/exec/pwd
|
||||
|
||||
.../examples/nodejs-bad-rest-api
|
||||
```
|
||||
|
@ -1,7 +1,7 @@
|
||||
express_server:
|
||||
container_name: express_server
|
||||
image: node:latest
|
||||
command: bash -c "apt-get -y update && apt-get -y install runit && npm install && runsv /usr/src/app"
|
||||
command: bash -c "apt-get -y update && apt-get -y install runit && cd /usr/src/app && npm install && runsv /usr/src/app"
|
||||
ports:
|
||||
- "8181:8181"
|
||||
volumes:
|
||||
|
@ -2,6 +2,6 @@
|
||||
"name": "bad-rest-api",
|
||||
"main": "server.js",
|
||||
"dependencies": {
|
||||
"express": "~4.0.0"
|
||||
"express": "~4.16.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user