Commit a2bdb89
feat(DATAGO-123600): Introduce fossa container scan and guard shareable workflow/actions (#65)
* feat: make SCA scan workflow flexible for Vault and GitHub Secrets
Add support for both Vault (private repos) and GitHub Secrets (public repos)
through conditional secret retrieval:
Key Changes:
- Add use_vault input flag (default: false) for secret source selection
- Add vault_url, vault_role, vault_secret_path inputs for Vault config
- Add FOSSA_API_KEY as workflow secret input for GitHub Secrets mode
- Remove hard-coded VAULT_ADDR environment variable
- Make Vault retrieval step conditional based on use_vault flag
- Add validation step to ensure API key from either source
- Update all FOSSA API key references to use unified output
- Update documentation with examples for both public and private repos
Benefits:
- Single workflow works for both public and private repos
- No hard-coded Vault URLs in public workflow
- Clear validation and error messages
- Backward compatible with migration path
Usage:
- Public repos: Pass FOSSA_API_KEY via secrets (default)
- Private repos: Set use_vault=true and provide vault_url
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add container scan and guard workflow with config support
- Added reusable container-scan-and-guard.yaml workflow
- Created workflow-config-loader action for centralized configuration
- Added container scanning actions (container-scan, fossa-scan, prisma-scan)
- Supports both Vault and GitHub Secrets for credential management
- Includes AWS ECR authentication for private registries
- Config-based approach reduces workflow inputs from 15+ to 6
- Added comprehensive documentation and architecture guides
* chore: ignore pilot-repos directory
* feat: use container image tag as FOSSA revision
- Extract image tag from container_image input
- Use tag as FOSSA revision instead of git ref
- For container scans, the image tag is more meaningful than git SHA
- Added image tag to workflow summary output
* refactor: remove git_ref input and second checkout
- Removed git_ref input parameter (no longer needed)
- Removed second checkout step that used git_ref
- Simplified context detection to PR vs Non-PR (instead of PR/Release/Manual)
- Container image tag is the FOSSA revision (from container_image input)
- Config file is loaded in first checkout, no second checkout needed
- Updated documentation and usage examples to remove git_ref references
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add FOSSA team and labels support for container scans
- Added team and labels fields to workflow-config.json schema
- Updated workflow-config-loader to parse and output fossa_team and fossa_labels
- Modified container-scan-and-guard to build scan params with team and labels
- Team and labels are now passed to FOSSA container analyze command
- Conditionally added only when configured in workflow-config.json
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: remove unused load-workflow-config workflow and simplify prisma-scan
- Remove .github/workflows/load-workflow-config.yaml (unused, replaced by workflow-config-loader action)
- Simplify container/prisma-scan/action.yaml to testing placeholder
- Action approach provides better integration than separate workflow
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: simplify prisma-scan README as placeholder
- Update README to clearly indicate placeholder status
- Remove detailed documentation for unimplemented features
- Add brief description of current behavior (dummy outputs)
- Reference related documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: move container scan architecture to cicd-processes-docs
- Remove container-scan-config-architecture.md from this repo
- Document now maintained in SolaceDev/cicd-processes-docs
- Centralize design docs in dedicated documentation repository
Reference: https://github.com/SolaceDev/cicd-processes-docs/blob/main/processes/security-scanning/design/container-scan-config-architecture.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: add comprehensive README for workflow-config-loader
- Add detailed documentation for workflow-config-loader action
- Include quick start examples for Vault and GitHub Secrets
- Document all inputs, outputs, and configuration schema
- Provide migration guide from workflow inputs to config file
- Add usage examples and error handling documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: refine workflow-config-schema for end-users
- Move schema to workflow-config-loader directory
- Remove efficiency/implementation details
- Focus only on configuration fields users need
- Add team and labels configuration documentation
- Simplify examples to common use cases
- Remove Prisma references (not yet implemented)
- Update related documentation links
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: use environment variables in shell steps for security
Following GitHub Actions security best practices, refactored all inline
shell steps to use environment variables instead of direct GitHub
expression interpolation. This prevents script injection attacks by
storing expression values in memory as variables rather than allowing
them to interact with the script generation process.
Changes:
- Added env blocks to all shell steps with GitHub expressions
- Replaced inline ${{ ... }} with environment variable references
- Applied double-quoting to all variable references for word splitting safety
Steps updated:
- Validate Container Image Input
- Merge Configuration and Inputs
- Determine scan context
- Determine Vault AWS Role
- Validate FOSSA API Key
- Determine FOSSA Project ID
- Build FOSSA Scan Parameters
- Report Container Scan Results
- Block on FOSSA Vulnerability Failures
- Log Emergency Bypass
References:
https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* clean up
* change references to main branch after testing
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1a75706 commit a2bdb89
File tree
13 files changed
+2611
-0
lines changed- .github/workflows
- container
- container-scan
- fossa-scan
- prisma-scan
- workflow-config-loader
13 files changed
+2611
-0
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
0 commit comments