Skip to content

An example C++ project using Makefile to demonstrate SourceClear scans.

Notifications You must be signed in to change notification settings

spencerxiao/example-cpp-makefile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[:] Example C++ project using Makefile.

An example C++ project using Makefile to demonstrate SourceClear scans.

Install and activate SourceClear

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.

Scan this project

Linux Users

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

Non-Linux users

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:

1. Clone this repo

git clone https://github.com/srcclr/example-cpp-makefile

2. Change current directory to the project directory

cd example-cpp-makefile

3. Build the Docker image

docker build . -t example-cpp-makefile

This builds an image with the name example-cpp-makefile.

4. Create and run container with the image

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.

About

An example C++ project using Makefile to demonstrate SourceClear scans.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 42.7%
  • Makefile 24.4%
  • Dockerfile 17.1%
  • C++ 15.8%