jenkins-infra / repository-permissions-updater

Artifactory permissions synchronization tool and data set
79 stars 1.05k forks source link

BeVigil CI Plugin #3026

Closed ashikka closed 1 year ago

ashikka commented 1 year ago

Repository URL

https://github.com/Bevigil/BeVigil-CI-plugin

New Repository Name

bevigil-ci-plugin

Description

BeVigil-Plugin

Introduction



image


This is a plugin to scan Android and ioS applications in your jenkins pipelines using CloudSek BeVigil. BeVigil can analyze code at scale and easily search for API keys, regexes, etc to see the matches in different files of an application.

Getting started

The BeVigil-CI plugin is intended to be used as an additional step in build pipelines that already build android or ios apps. In this section, we will asume that you already have a pipeline running to build your application.

Installing the plugin

To use this plugin, you need to install it in your Jenkins installation. To do this, first login to your jenkins server, and click on "Manage Plugins" on the Manage Jenkins page:

Next, navigate to the available tab, and search for the "BeVigil VI" plugin. Click the checkbox next the plugin, and then click on "Install without Restart" to install the plugin.

Using the plugin in your jenkins build

  1. Add a build step which uses the plugin on your Jenkins CI Build Pipeline:

    image
  2. Now, configure the following information about your app on the build step:

    image
  1. Save your build step, and start a new build. If all goes well, the plugin should print the report to stdout.

How the plugin works

image

Mobile applications are often full of security issues which when not identified can cost organizations a lot. This plugin helps to identify potential security vulnerabilities in the code. By running a scan during the build process, developers can catch and fix vulnerabilities early on, which can help to prevent security breaches and protect the integrity of the application. The plugin can be easily configured making it a valuable tool for any organization that values security.

The plugin recieves an AWS presigned URL where it uploaded the build file of the app after reading it. After uploading the file successfully, the file is scanned using BeVigil's API for vulnerabilites. Finally, we get the output for the scan.

image



Output

image

Issues

Report issues and enhancements in the Jenkins issue tracker.

Contributing

Refer to our contribution guidelines

LICENSE

Licensed under MIT, see LICENSE

GitHub users to have commit permission

@ashikka

Jenkins project users to have release permission

ashikka

Issue tracker

GitHub issues

jenkins-cert-app commented 1 year ago

Security audit, information and commands

The security team is auditing all the hosting requests, to ensure a better security by default. This message informs you that the security team was notified about the request and will soon participate in this issue to assist. The team is usually starting by a quick superficial audit and if it's not sufficient, they are planning a deeper audit.

Commands Security team only:
  • /audit-ok => the audit is complete, the hosting can continue :tada:.
  • /audit-skip => the audit is not necessary, the hosting can continue :tada:.
  • /audit-required => the superficial audit was not sufficient, a deeper look is necessary :mag:.
  • /audit-findings => the audit reveals some issues that require corrections :pencil2:.
Anyone:
  • /audit-review => the findings from the audits were corrected, this command will ping the security team to review the findings :eyes:. It's only applicable when the previous audit required changes.
Only one command can be requested per comment.

(automatically generated message)

github-actions[bot] commented 1 year ago

Hello from your friendly Jenkins Hosting Checker

It appears you have some issues with your hosting request. Please see the list below and correct all issues marked Required. Your hosting request will not be approved until these issues are corrected. Issues marked with Warning or Info are just recommendations and will not stall the hosting process.

You can re-trigger a check by editing your hosting request or by commenting /hosting re-check

ashikka commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year ago

Hello from your friendly Jenkins Hosting Checker

It appears you have some issues with your hosting request. Please see the list below and correct all issues marked Required. Your hosting request will not be approved until these issues are corrected. Issues marked with Warning or Info are just recommendations and will not stall the hosting process.

You can re-trigger a check by editing your hosting request or by commenting /hosting re-check

ashikka commented 1 year ago

@NotMyFault should I stick with the lowercase name even though the bot is asking me to change it to BeVigil-CI?

Kevin-CB commented 1 year ago

Quick look at the code, we'll perform a more complete security audit, tracked internally as JENSEC-1921.

github-actions[bot] commented 1 year ago

Hello from your friendly Jenkins Hosting Checker

It looks like you have everything in order for your hosting request. A human volunteer will check over things that I am not able to check for (code review, README content, etc) and process the request as quickly as possible. Thank you for your patience.

Hosting team members can host this request with /hosting host

NotMyFault commented 1 year ago

@ashikka I fixed it for you. Repository names should be all lowercase.

NotMyFault commented 1 year ago

Hey @ashikka,

I took a quick glance over your repository setup and noticed the following:

yaroslavafenkin commented 1 year ago

Hey @ashikka,

We'll let you correct those and let us know when you're done for another round of review.

ashikka commented 1 year ago

Hello @yaroslavafenkin @NotMyFault, thank you for your review. I have corrected all the points you have mentioned and you can proceed with another round of review.

ashikka commented 1 year ago

Hi @yaroslavafenkin @NotMyFault , just following up. Did you get a chance to check out the changes?

NotMyFault commented 1 year ago

I've struck through my points, thanks.

yaroslavafenkin commented 1 year ago

Hi @ashikka,

Third point is not fully addressed. Checking for absolute path is not enough as it does not grant protection against symlinks. Refer to https://docs.oracle.com/javase/7/docs/api/java/io/File.html#getCanonicalPath(). Other corrections seem to be fine, crossed those points out.

yaroslavafenkin commented 1 year ago

/audit-findings

ashikka commented 1 year ago

Hello @yaroslavafenkin,

I have made the correction. Please check.

yaroslavafenkin commented 1 year ago

Re-checked, seems fine now.

yaroslavafenkin commented 1 year ago

/audit-ok

timja commented 1 year ago

/hosting re-check

github-actions[bot] commented 1 year ago

Hello from your friendly Jenkins Hosting Checker

It looks like you have everything in order for your hosting request. A human volunteer will check over things that I am not able to check for (code review, README content, etc) and process the request as quickly as possible. Thank you for your patience.

Hosting team members can host this request with /hosting host

timja commented 1 year ago

/hosting host

jenkins-infra-bot commented 1 year ago

Hosting request complete, the code has been forked into the jenkinsci project on GitHub as https://github.com/jenkinsci/bevigil-ci-plugin

GitHub issues has been selected for issue tracking and was enabled for the forked repo.

A pull request has been created against the repository permissions updater to setup release permissions. Additional users can be added by modifying the created file.

Please delete your original repository (if there are no other forks), under 'Danger Zone', so that the jenkinsci organization repository is the definitive source for the code. If there are other forks, please contact GitHub support to make the jenkinsci repo the root of the fork network (mention that Jenkins approval was given in support request 569994). Also, please make sure you properly follow the documentation on documenting your plugin so that your plugin is correctly documented.

You will also need to do the following in order to push changes and release your plugin:

In order for your plugin to be built by the Jenkins CI Infrastructure and check pull requests, please add a Jenkinsfile to the root of your repository with the following content: buildPlugin(useContainerAgent: true, jdkVersions: [8, 11])

Welcome aboard!