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

[ZKUI-349] ✨ Implement GHAS #586

Merged
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
25 changes: 25 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: codeQL

on:
push:
branches: [development/*, stabilization/*, hotfix/*]
pull_request:
branches: [development/*, stabilization/*, hotfix/*]
workflow_dispatch:

jobs:
analyze:
name: Static analysis with CodeQL
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript, typescript

- name: Build and analyze
uses: github/codeql-action/analyze@v2
16 changes: 16 additions & 0 deletions .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: dependency review

on:
pull_request:
branches: [development/*, stabilization/*, hotfix/*]

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3

- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
30 changes: 30 additions & 0 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: security

on:
push:
branches: [development/*, stabilization/*, hotfix/*]
release:
types: [published]
pull_request:
branches: [development/*, stabilization/*, hotfix/*]
schedule:
- cron: '0 8 * * 1' # Monday - 8am - UTC
workflow_dispatch:


jobs:
build-zenko-ui:
permissions:
contents: read
packages: write
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
with:
name: zenko-ui
Comment on lines +17 to +23
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of rebuilding the image, we can run the scan on the image matching the head of the branch.

Copy link
Contributor

Choose a reason for hiding this comment

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

We might be facing a race condition in this case. If we want this workflow to be independent we should be building this image.

Copy link
Contributor Author

@gaspardmoindrot gaspardmoindrot May 16, 2023

Choose a reason for hiding this comment

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

You mean using the build that is created in build-push-tests.yml, right? In this case, indeed, we may have a race condition issue since we cannot use cross-file needs.


trivy-zenko-ui:
needs: build-zenko-ui
name: Trivy Vulnerability Scan for Code for Zenko-ui
uses: scality/workflows/.github/workflows/trivy.yaml@v1
with:
name: zenko-ui