Skip to content

Commit f4c3ba9

Browse files
chriswkCopilot
andauthored
task: trivy security warnings (#218)
* chore(ci): Turn off trivy superlinting for now. Requires a more focused job to fix * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4ec70f2 commit f4c3ba9

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

.github/super-linter.env

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
DEFAULT_BRANCH=main
2+
VALIDATE_ALL_CODEBASE=false
3+
VALIDATE_JSCPD=false
4+
VALIDATE_KUBERNETES_KUBEVAL=false
5+
VALIDATE_YAML=false
6+
VALIDATE_KUBERNETES_KUBECONFORM=false
7+
VALIDATE_CHECKOV=false
8+
VALIDATE_YAML_PRETTIER=false
9+
VALIDATE_ESLINT=false
10+
VALIDATE_BIOME_FORMAT=false
11+
VALIDATE_TRIVY=false

.github/workflows/ci.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,16 @@ jobs:
5151
# Full git history is needed to get a proper
5252
# list of changed files within `super-linter`
5353
fetch-depth: 0
54+
- name: Load super-linter configuration
55+
# Use grep inverse matching to exclude eventual comments in the .env file
56+
# because the GitHub Actions command to set environment variables doesn't
57+
# support comments.
58+
# Ref: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
59+
run: grep -v '^#' .github/super-linter.env >> "$GITHUB_ENV"
5460
- name: Lint Code Base
5561
uses: super-linter/super-linter@v8.2.1
5662
env:
57-
DEFAULT_BRANCH: main
5863
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
VALIDATE_ALL_CODEBASE: false
60-
VALIDATE_JSCPD: false
61-
VALIDATE_KUBERNETES_KUBEVAL: false
62-
VALIDATE_YAML: false
63-
VALIDATE_KUBERNETES_KUBECONFORM: false
64-
VALIDATE_CHECKOV: false
6564

6665
kubeconform:
6766
runs-on: ubuntu-latest

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,14 @@ helm install --debug --generate-name . # this will install the chart using the l
6464
# To see the output of the helm chart without running it locally, you can run the following command:
6565
helm install --debug --dry-run --generate-name .
6666
```
67+
68+
## Running superlinter locally
69+
If you're struggling with getting CI to successfully lint your code, you can run superlinter locally to see what's wrong. To do this, you need to have Docker installed on your machine. Once you have Docker installed, you can run the following command:
70+
71+
```bash
72+
docker run --rm \
73+
-e RUN_LOCAL=true \
74+
--env-file ".github/super-linter.env" \
75+
-v "$(pwd)":/tmp/lint \
76+
ghcr.io/super-linter/super-linter:latest
77+
```

0 commit comments

Comments
 (0)