An example C++ project using Makefile to demonstrate SourceClear scans.
Follow the instructions under the section "Setup and Configuration" in https://www.sourceclear.com/docs/command-line-interface/ to install and activate our SourceClear agent.
The latest version of SourceClear agent only supports C++ projects build on Linux platforms. If you are using a Linux OS, you can scan this project by running
SRCCLR_CPP=true srcclr scan --url https://github.com/srcclr/example-cpp-makefile
For non-linux users, there is a Dockerfile in this repo that builds a Linux container image with this project in it. The steps to setup and test are as follow:
git clone https://github.com/srcclr/example-cpp-makefile
cd example-cpp-makefile
docker build . -t example-cpp-makefile
This builds an image with the name example-cpp-makefile.
docker run -e SRCCLR_CPP=true -e SRCCLR_API_TOKEN=<token> --rm -t --name example-cpp-makefile example-cpp-makefile
This creates a container with the name example-cpp-makefile, runs it and removes it after it has completed. The following environment variables are needed to scan the project:
SRCCLR_CPP=true: required to enable scanning Makefile projects as the feature is feature-flagged.SRCCLR_API_TOKEN=<token>: your SourceClear API Token. Needed for scans to authenticate with SourceClear.