Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflow-templates/security-scan.properties.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 91 additions & 0 deletions .github/workflow-templates/security-scan.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions src/lib/__tests__/workflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,5 +336,29 @@ describe('GitHub Actions Workflows', () => {
expect(properties.name).toBe('Dependabot Auto-Merge')
expect(properties.description.length).toBeGreaterThan(0)
})

it('should have a valid security-scan template with properties file', () => {
const templatePath = join(
process.cwd(),
'.github/workflow-templates/security-scan.yml'
)
expect(existsSync(templatePath)).toBe(true)
const template = parse(readFileSync(templatePath, 'utf-8'))
expect(template).toBeDefined()
expect(template.name).toBe('Security Scan')
expect(template.jobs).toHaveProperty('shellcheck')
expect(template.jobs).toHaveProperty('secret-detection')
expect(template.jobs).toHaveProperty('trivy-fs')

const propertiesPath = join(
process.cwd(),
'.github/workflow-templates/security-scan.properties.json'
)
const properties = JSON.parse(
readFileSync(propertiesPath, 'utf-8')
) as { name: string; description: string }
expect(properties.name).toBe('Security Scan')
expect(properties.description.length).toBeGreaterThan(0)
})
})
})
Loading