|
1 | | -# . |
| 1 | +# Vigilnz Security Plugin |
2 | 2 |
|
3 | | -## Introduction |
| 3 | +[](https://plugins.jenkins.io/vigilnz-security) |
| 4 | +[](https://plugins.jenkins.io/vigilnz-security) |
4 | 5 |
|
5 | | -TODO Describe what your plugin does here |
| 6 | +Vigilnz Security Plugin integrates comprehensive security scanning capabilities into Jenkins CI/CD pipelines. Run CVE, SAST, SBOM, and other security scans as part of your build process. |
6 | 7 |
|
7 | | -## Getting started |
| 8 | +## Features |
8 | 9 |
|
9 | | -TODO Tell users how to configure your plugin here, include screenshots, pipeline examples and |
10 | | -configuration-as-code examples. |
| 10 | +- 🔒 **Multiple Scan Types**: Support for CVE, SAST, SBOM, and more |
| 11 | +- 🔐 **Secure Credential Management**: Store and manage Vigilnz API tokens securely |
| 12 | +- 🚀 **Freestyle & Pipeline Support**: Works with both traditional and modern Jenkins jobs |
| 13 | +- 📊 **Detailed Results**: View scan results directly in the Jenkins build sidebar |
| 14 | +- ⚙️ **Flexible Configuration**: Select which scan types to run per build |
| 15 | +- 🔄 **Token Management**: Automatic token refresh and caching |
11 | 16 |
|
12 | | -## Issues |
| 17 | +## Requirements |
13 | 18 |
|
14 | | -TODO Decide where you're going to host your issues, the default is Jenkins JIRA, but you can also enable GitHub issues, |
15 | | -If you use GitHub issues there's no need for this section; else add the following line: |
| 19 | +- Jenkins 2.516.3 or later |
| 20 | +- Java 17 or later |
| 21 | +- Vigilnz API access (API key required) |
16 | 22 |
|
17 | | -Report issues and enhancements in the [Jenkins issue tracker](https://issues.jenkins.io/). |
| 23 | +## Installation |
| 24 | + |
| 25 | +### From Jenkins Update Center |
| 26 | + |
| 27 | +1. Go to **Manage Jenkins** → **Manage Plugins** |
| 28 | +2. Search for "Vigilnz Security" |
| 29 | +3. Click **Install without restart** or **Download now and install after restart** |
| 30 | + |
| 31 | +### Manual Installation |
| 32 | + |
| 33 | +1. Download the latest `.hpi` file from [GitHub Releases](https://github.com/your-org/vigilnz-security-plugin/releases) |
| 34 | +2. Go to **Manage Jenkins** → **Manage Plugins** → **Advanced** |
| 35 | +3. Upload the `.hpi` file under **Upload Plugin** |
| 36 | +4. Restart Jenkins |
| 37 | + |
| 38 | +## Getting Started |
| 39 | + |
| 40 | +### 1. Configure Vigilnz Credentials |
| 41 | + |
| 42 | +1. Go to **Manage Jenkins** → **Manage Credentials** |
| 43 | +2. Click **Add Credentials** |
| 44 | +3. Select **Vigilnz Security Token** from the kind dropdown |
| 45 | +4. Enter: |
| 46 | + - **Token**: Your Vigilnz API key |
| 47 | + - **ID**: Unique identifier (optional, auto-generated if not provided) |
| 48 | + - **Description**: Description for this credential |
| 49 | +5. Click **OK** |
| 50 | + |
| 51 | +### 2. Use in Freestyle Job |
| 52 | + |
| 53 | +1. Create a new Freestyle project or edit an existing one |
| 54 | +2. In **Build Steps**, click **Add build step** → **Invoke Vigilnz Security Task** |
| 55 | +3. Configure: |
| 56 | + - **Token**: Select your Vigilnz credential |
| 57 | + - **Target File**: (Optional) File or path to scan |
| 58 | + - **Scan Types**: Select at least one scan type (CVE, SAST, SBOM) |
| 59 | +4. Save and run the build |
| 60 | + |
| 61 | +### 3. Use in Pipeline |
| 62 | + |
| 63 | +```groovy |
| 64 | +pipeline { |
| 65 | + agent any |
| 66 | +
|
| 67 | + stages { |
| 68 | + stage('Security Scan') { |
| 69 | + steps { |
| 70 | + vigilnzScan( |
| 71 | + token: 'my-vigilnz-token', |
| 72 | + scanTypes: ['cve', 'sast', 'sbom'] |
| 73 | + ) |
| 74 | + } |
| 75 | + } |
| 76 | + } |
| 77 | +} |
| 78 | +``` |
| 79 | + |
| 80 | +## Configuration |
| 81 | + |
| 82 | +### Environment Variables |
| 83 | + |
| 84 | +You can configure API endpoints using environment variables or system properties: |
| 85 | + |
| 86 | +- `VIGILNZ_AUTH_URL` or `-Dvigilnz.auth.url`: Authentication API URL (default: `http://localhost:1337/auth/api-key`) |
| 87 | +- `VIGILNZ_SCAN_URL` or `-Dvigilnz.scan.url`: Multi-scan API URL (default: `http://localhost:8000/scan-targets/multi-scan`) |
| 88 | + |
| 89 | +### Scan Types |
| 90 | + |
| 91 | +- **CVE**: Common Vulnerabilities and Exposures scan |
| 92 | +- **SAST**: Static Application Security Testing |
| 93 | +- **SBOM**: Software Bill of Materials |
| 94 | + |
| 95 | +## Viewing Results |
| 96 | + |
| 97 | +After a build completes: |
| 98 | + |
| 99 | +1. **Sidebar Summary**: View a quick summary in the build page sidebar |
| 100 | +2. **Full Details**: Click "View Details →" in the sidebar to see complete scan results |
| 101 | +3. **Console Output**: Check the build console for detailed scan logs |
| 102 | + |
| 103 | +## Pipeline Examples |
| 104 | + |
| 105 | +### Basic Usage |
| 106 | + |
| 107 | +```groovy |
| 108 | +vigilnzScan( |
| 109 | + token: 'my-vigilnz-token', |
| 110 | + scanTypes: ['cve'] |
| 111 | +) |
| 112 | +``` |
| 113 | + |
| 114 | +### Multiple Scan Types |
| 115 | + |
| 116 | +```groovy |
| 117 | +vigilnzScan( |
| 118 | + token: 'my-vigilnz-token', |
| 119 | + scanTypes: ['cve', 'sast', 'sbom'] |
| 120 | +) |
| 121 | +``` |
| 122 | + |
| 123 | +### With Credentials Binding |
| 124 | + |
| 125 | +```groovy |
| 126 | +pipeline { |
| 127 | + agent any |
| 128 | +
|
| 129 | + stages { |
| 130 | + stage('Security Scan') { |
| 131 | + steps { |
| 132 | + withCredentials([string(credentialsId: 'vigilnz-token', variable: 'VIGILNZ_TOKEN')]) { |
| 133 | + vigilnzScan( |
| 134 | + token: 'vigilnz-token', |
| 135 | + scanTypes: ['cve', 'sast'] |
| 136 | + ) |
| 137 | + } |
| 138 | + } |
| 139 | + } |
| 140 | + } |
| 141 | +} |
| 142 | +``` |
| 143 | + |
| 144 | +## Troubleshooting |
| 145 | + |
| 146 | +### Authentication Failed |
| 147 | + |
| 148 | +- Verify your API key is correct |
| 149 | +- Check that the authentication URL is accessible |
| 150 | +- Ensure the token has not expired |
| 151 | + |
| 152 | +### Scan Types Not Selected |
| 153 | + |
| 154 | +- At least one scan type must be selected |
| 155 | +- Check the checkbox selections in the build configuration |
| 156 | + |
| 157 | +### No Results in Sidebar |
| 158 | + |
| 159 | +- Ensure the build completed successfully |
| 160 | +- Check the build console for any errors |
| 161 | +- Verify the API response was successful |
| 162 | + |
| 163 | +## Support |
| 164 | + |
| 165 | +- **Issues**: Report issues on [GitHub Issues](https://github.com/your-org/vigilnz-security-plugin/issues) |
| 166 | +- **Documentation**: [Plugin Wiki](https://github.com/your-org/vigilnz-security-plugin/wiki) |
| 167 | + |
18 | 168 |
|
19 | 169 | ## Contributing |
20 | 170 |
|
21 | | -TODO review the default [CONTRIBUTING](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) file and make sure it is appropriate for your plugin, if not then add your own one adapted from the base file |
| 171 | +Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines. |
| 172 | + |
| 173 | +## Changelog |
22 | 174 |
|
23 | | -Refer to our [contribution guidelines](https://github.com/jenkinsci/.github/blob/master/CONTRIBUTING.md) |
| 175 | +### Version 1.0 |
24 | 176 |
|
25 | | -## LICENSE |
| 177 | +- Initial release |
| 178 | +- Support for CVE, SAST, SBOM scan types |
| 179 | +- Freestyle and Pipeline job support |
| 180 | +- Secure credential management |
| 181 | +- Build sidebar results display |
26 | 182 |
|
27 | | -Licensed under MIT, see [LICENSE](LICENSE.md) |
| 183 | +## License |
28 | 184 |
|
| 185 | +Licensed under MIT License. See [LICENSE](LICENSE.md) for details. |
0 commit comments