Skip to content

Commit 1ed0845

Browse files
committed
ci: update of superlinter config files
1 parent 1a87ab7 commit 1ed0845

File tree

8 files changed

+141
-0
lines changed

8 files changed

+141
-0
lines changed

.github/linters/.checkov.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
quiet: true
4+
5+
skip-check:
6+
# https://www.checkov.io/5.Policy%20Index/kubernetes.html
7+
- CKV_K8S_15 # Image Pull Policy should be Always
8+
- CKV_K8S_21 # The default namespace should not be used
9+
- CKV_K8S_22 # Use read-only filesystem for containers where possible
10+
- CKV_K8S_35 # Prefer using secrets as files over secrets as environment variables
11+
- CKV_K8S_38 # Ensure that Service Account Tokens are only mounted where necessary
12+
- CKV_K8S_40 # Containers should run as a high UID to avoid host conflict
13+
- CKV_K8S_43 # Image should use digest
14+
- CKV2_K8S_5 # No ServiceAccount/Node should be able to read all secrets
15+
- CKV2_K8S_6 # Minimize the admission of pods which lack an associated NetworkPolicy
16+
# https://www.checkov.io/5.Policy%20Index/dockerfile.html
17+
- CKV_DOCKER_2 # Ensure that HEALTHCHECK instructions have been added to container images
18+
# https://www.checkov.io/5.Policy%20Index/secrets.html
19+
- CKV_SECRET_6 # Base64 High Entropy String
20+
# https://www.checkov.io/5.Policy%20Index/github_actions.html
21+
- CKV2_GHA_1 # Ensure top-level permissions are not set to write-all
22+
- CKV_GHA_7 # The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty.

.github/linters/.eslintrc.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
env:
3+
es6: true
4+
5+
extends:
6+
- "eslint:recommended"
7+
8+
parser: "@typescript-eslint/parser"
9+
10+
plugins:
11+
- "@typescript-eslint"
12+
13+
rules:
14+
no-undef: 'warn'
15+
16+
globals:
17+
module: "writable"

.github/linters/.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 120

.github/linters/.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
run:
2+
timeout: 10m

.github/linters/.jscpd.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"threshold": 2,
3+
"ignore": [
4+
"**/.git/**",
5+
"**/charts/*/templates/*/*.yaml",
6+
"**/charts/*/templates/*/*/*.yaml",
7+
"**/docs/examples/**"
8+
]
9+
}

.github/linters/.yaml-lint.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
#### Config file for yamllint
3+
# Rules: https://yamllint.readthedocs.io/en/stable/rules.html
4+
5+
# Exclude not required files
6+
ignore-from-file:
7+
- .gitignore
8+
- .yamlignore
9+
10+
rules:
11+
braces:
12+
min-spaces-inside: 1
13+
max-spaces-inside: 1
14+
min-spaces-inside-empty: 0
15+
max-spaces-inside-empty: 0
16+
brackets:
17+
min-spaces-inside: 0
18+
max-spaces-inside: 1
19+
min-spaces-inside-empty: -1
20+
max-spaces-inside-empty: -1
21+
colons:
22+
max-spaces-before: 0
23+
max-spaces-after: -1
24+
commas:
25+
max-spaces-before: 0
26+
min-spaces-after: 1
27+
max-spaces-after: 1
28+
comments:
29+
level: warning
30+
require-starting-space: true
31+
min-spaces-from-content: 1
32+
comments-indentation:
33+
level: warning
34+
document-end: disable
35+
document-start: disable
36+
# level: warning
37+
# present: false
38+
empty-lines:
39+
level: warning
40+
max: 2
41+
max-start: 0
42+
max-end: 2
43+
empty-values:
44+
forbid-in-block-mappings: true
45+
forbid-in-flow-mappings: true
46+
hyphens:
47+
max-spaces-after: 1
48+
indentation:
49+
spaces: 2
50+
indent-sequences: false
51+
check-multi-line-strings: false
52+
key-duplicates: enable
53+
key-ordering: disable
54+
line-length: disable
55+
# max: 100
56+
# allow-non-breakable-words: true
57+
# allow-non-breakable-inline-mappings: true
58+
new-line-at-end-of-file: disable
59+
new-lines:
60+
type: unix
61+
octal-values:
62+
forbid-implicit-octal: false
63+
forbid-explicit-octal: false
64+
trailing-spaces: enable
65+
truthy: disable

.github/linters/actionlint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
paths:
2+
.github/workflows/**/*.{yml,yaml}:
3+
ignore:
4+
- 'shellcheck reported issue in this script: SC2086:info.+'
5+
- 'shellcheck reported issue in this script: SC2002:style.+'

.github/super-linter.env

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# File will be loaded as environment variables
2+
# It must contain strings like:
3+
# name=value
4+
5+
GITLEAKS_LOG_LEVEL=warn
6+
VALIDATE_JAVASCRIPT_PRETTIER=false
7+
VALIDATE_JAVASCRIPT_STANDARD=false
8+
VALIDATE_JSCPD=false
9+
VALIDATE_JSON_PRETTIER=false
10+
VALIDATE_KUBERNETES_KUBECONFORM=false
11+
VALIDATE_MARKDOWN_PRETTIER=false
12+
VALIDATE_YAML_PRETTIER=false
13+
14+
# TODO: fix python files and enable the check again
15+
VALIDATE_PYTHON_BLACK=false
16+
VALIDATE_PYTHON_FLAKE8=false
17+
VALIDATE_PYTHON_MYPY=false
18+
VALIDATE_PYTHON_PYINK=false
19+
VALIDATE_PYTHON_PYLINT=false

0 commit comments

Comments
 (0)