
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.
github.com/alext251/hello-world-api
This section contains the list of prerequisites as well as installation information for each.
Using the provided Dockerfile to build image hello-world:latest
, run the command in the project root directory:
docker build . -t hello-world
Run the API container with docker run
. The API listens on port 8080 in the container. To access the endpoints you need to specify a port on your host machine to forward to port 8080 on the container by adding -p <HOST PORT>:8080
to the docker run
command. From here on out, the instructions assume port 8080 is also being used on the host machine.
docker run -itd -p 8080:8080 --name hello-world-api hello-world
Debug logs will look like the following 2020/07/13 01:50:43 - localhost:8080/
.
Debug logging can be enabled upon container startup. To enable logging use the following command:
docker run -itd -p 8080:8080 --name hello-world-api hello-world api --debug
To access the logs run:
docker logs hello-world-api
Here are some example curls to test and their expected results:
curl localhost:8080/
returns <p>Hello, World</p>
curl -H 'Accept: application/json' localhost:8080/
returns {"message": "Hello, World"}
curl -H 'Accept: image/webp' localhost:8080/
returns <p>Hello, World</p>
curl -X POST localhost:8080/
returns <p>Hello, World</p>
To run the go API tests in web/web_test.go
the options are to call:
go test -v ./...
from the project root directorygo test -v ./web
from the project root directorygo test -v
from the web/
directoryTo tear down API container execute command:
docker stop hello-world-api && docker rm hello-world-api
FAQs
Unknown package
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.