globocom / globocom/huskyCI

Add Infer as a new securityTest

Open
#511 2 comments 0 reactions 0 assignees View on GitHub
feature-request hacktoberfest2022
Dominant language
Go
Stars
595
Forks
135
PR merge metrics
No merged PRs in 30d

Description

## Motivation

Facebook has developed [this cool Open Source tool](https://fbinfer.com/) to detect bugs in Java and C/C++/Objective-C code and it will be a great addition to huskyCI analysis.

## It would be great if

We have all the necessary code to scan these new languages!

## What we expect

* A working container of Infer that outputs a JSON after running the analysis in a particular folder. Similar to [this](https://github.com/globocom/huskyCI/blob/master/deployments/dockerfiles/safety/Dockerfile) to be uploaded to [Docker Hub](http://hub.docker.com/r/huskyci/) as `huskyci/infer:latest`.
* Add into [`config.yaml`](https://github.com/globocom/huskyCI/blob/master/api/config.yaml) commands needed to run inside the securityTest container.
* Adjust [`context.go`](https://github.com/globocom/huskyCI/blob/master/api/context/context.go) to have the new Infer securityTest configs.
* Add new error messages related to Infer in [`messagecodes.go`](https://github.com/globocom/huskyCI/blob/master/api/log/messagecodes.go).
* Add a new file into [`securitytest`](https://github.com/globocom/huskyCI/tree/master/api/securitytest) package and adjust its logic to now handle Infer output.
* Add new code into [client analysis package](https://github.com/globocom/huskyCI/tree/master/client/analysis) to print to STDOUT Infer results.

## Tips

* Search how a particular securityTest work and apply the same logic (Ctrl + F + "bandit" will do 🙃).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.