Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: monitor cpp projects #1520

Merged
merged 1 commit into from
Nov 13, 2020
Merged

feat: monitor cpp projects #1520

merged 1 commit into from
Nov 13, 2020

Conversation

gitphill
Copy link
Contributor

@gitphill gitphill commented Nov 10, 2020

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

Monitor C/C++ projects

Using new release of snyk-cpp-plugin that adds target and project name. Sending C/C++ fingerprints to Snyk to be saved as a project and monitored over time.

@anthogez anthogez force-pushed the feat/monitor-cpp-projects branch 2 times, most recently from 4386715 to 68a2400 Compare November 12, 2020 20:22
@@ -8,7 +8,7 @@ export async function getExtraProjectCount(
options: Options,
inspectResult: pluginApi.InspectResult,
): Promise<number | undefined> {
if (options.docker) {
if (options.docker || options.source) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I will add a test also for getExtraProjectCount it's not being tested at all

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ added for this functionality

@@ -5,7 +5,7 @@ import { Ecosystem, EcosystemPlugin } from './types';
const EcosystemPlugins: {
readonly [ecosystem in Ecosystem]: EcosystemPlugin;
} = {
cpp: cppPlugin,
cpp: cppPlugin as EcosystemPlugin,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added this cast in order to avoid TS crying on ScanResult types - cpp-plugin expect only GitTarget while CLI an union of GitTarget | ContainerTarget.
To be honest I do not like this casting neither the as any below - we need decide how do we want proceed here also keep plugins in sync with EcosystemPlugin interface I believe worth move it to its own lib

@anthogez anthogez force-pushed the feat/monitor-cpp-projects branch 2 times, most recently from 29cafe8 to 68da62c Compare November 13, 2020 08:25
@anthogez anthogez marked this pull request as ready for review November 13, 2020 08:25
@anthogez anthogez requested review from a team as code owners November 13, 2020 08:25
@ghost ghost requested review from anthogez and orsagie November 13, 2020 08:25
name: 'snyk',
target: {
branch: 'feat/monitor-cpp-projects',
remoteUrl: 'git@github.com:snyk/snyk.git',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to relax this assertion - so that it still works when we merge to master!

@anthogez anthogez force-pushed the feat/monitor-cpp-projects branch 4 times, most recently from f88292f to 90d7962 Compare November 13, 2020 13:28
@@ -0,0 +1,207 @@
import * as fs from 'fs';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once the number of ecosystems increases we can create a sub-folder foreach

@anthogez anthogez force-pushed the feat/monitor-cpp-projects branch 2 times, most recently from 3b4fbad to ee26d57 Compare November 13, 2020 14:52
@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2020

Expected release notes (by @anthogez)

features:
monitor cpp projects (3a91100)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

@anthogez anthogez merged commit 33bab10 into master Nov 13, 2020
@anthogez anthogez deleted the feat/monitor-cpp-projects branch November 13, 2020 15:43
@snyksec
Copy link

snyksec commented Nov 13, 2020

🎉 This PR is included in version 1.426.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants