8000 Apply megalinter autofixes by the-simmon · Pull Request #1295 · secureCodeBox/secureCodeBox · GitHub
[go: up one dir, main page]

Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exclude_patterns:
- "**/*.test.js"
- "**/*.test.ts"
- "**/*.d.ts"
# Generated
# Generated
- "**/hooks/cascading-scans/scan-helpers.js"
- "**/hooks/cascading-scans/hook.js"
# Auto Generated by kubernetes java client
Expand Down
56 changes: 28 additions & 28 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,46 @@
#
# SPDX-License-Identifier: Apache-2.0

name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
name-template: "v$NEXT_PATCH_VERSION"
tag-template: "v$NEXT_PATCH_VERSION"
categories:
- title: '💣 Breaking'
label: 'breaking'
- title: '🚀 Features'
label: 'enhancement'
- title: '🚓 Security Scanner'
label: 'scanner'
- title: '⚓️ Hooks'
label: 'hook'
- title: '🐛 Bug Fixes'
label: 'bug'
- title: '🧪 Test'
labels:
- 'test'
- 'testing'
- title: '📚 Documentation'
labels:
- 'docs'
- 'documentation'
- title: '🔧 Maintenance'
label: 'maintenance'
- title: '📌 Dependencies'
label: 'dependencies'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
- title: "💣 Breaking"
label: "breaking"
- title: "🚀 Features"
label: "enhancement"
- title: "🚓 Security Scanner"
label: "scanner"
- title: "⚓️ Hooks"
label: "hook"
- title: "🐛 Bug Fixes"
label: "bug"
- title: "🧪 Test"
labels:
- "test"
- "testing"
- title: "📚 Documentation"
labels:
- "docs"
- "documentation"
- title: "🔧 Maintenance"
label: "maintenance"
- title: "📌 Dependencies"
label: "dependencies"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
exclude-labels:
- 'skip-changelog'
- "skip-changelog"
template: |
## Changes
This release contains the following changes 🎉. Help spread the word or leave a GitHub star if you like it 😉

![GitHub commits since tagged version](https://img.shields.io/github/commits-since/secureCodeBox/secureCodeBox/$PREVIOUS_TAG) ![GitHub Repo stars](https://img.shields.io/github/stars/secureCodeBox/secureCodeBox?style=social) ![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Freleases%2Ftag%2Flatest)

$CHANGES

## Distribution
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/secureCodeBox)](https://artifacthub.io/packages/search?repo=securecodebox)
[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-secureCodeBox-blue?style=flat&logo=docker&color=lightblue&labelColor=blue&logoColor=white)](https://hub.docker.com/u/securecodebox)

## Contributors
Thanks to all our contributors supporting this project 🤗
$CONTRIBUTORS
2 changes: 1 addition & 1 deletion .github/workflows/helm-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ jobs:
commit_user_email: securecodebox@iteratec.com
# Optional. Used by `git-commit`.
# See https://git-scm.com/docs/git-commit#_options
commit_options: '--signoff'
commit_options: "--signoff"
2 changes: 1 addition & 1 deletion .github/workflows/release-tweet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: "Tweet about release"
on:
release:
types: [ released ]
types: [released]
jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ VALIDATE_ALL_CODEBASE: false
IGNORE_GENERATED_FILES: true

# disable useless alpaca ascii art that gets printed at the start of the linting
PRINT_ALPACA: false
PRINT_ALPACA: false
3 changes: 1 addition & 2 deletions .templates/new-scanner/parser/__testFiles__/empty.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
[
]
[]
4 changes: 1 addition & 3 deletions .templates/new-scanner/parser/__testFiles__/example.com.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
[
{"target":"http://example.com"}
]
[{ "target": "http://example.com" }]
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ metadata:
name: "new-scanner-json"
spec:
image: "{{ .Values.parser.image.repository }}:{{ .Values.parser.image.tag | default .Chart.Version }}"
imagePullPolicy: {{ .Values.parser.image.pullPolicy }}
ttlSecondsAfterFinished: {{ .Values.parser.ttlSecondsAfterFinished }}
env:
{{- toYaml .Values.parser.env | nindent 4 }}
imagePullPolicy: { { .Values.parser.image.pullPolicy } }
ttlSecondsAfterFinished: { { .Values.parser.ttlSecondsAfterFinished } }
env: { { - toYaml .Values.parser.env | nindent 4 } }
scopeLimiterAliases:
{{- toYaml .Values.parser.scopeLimiterAliases | nindent 4 }}
affinity:
{{- toYaml .Values.parser.affinity | nindent 4 }}
tolerations:
{{- toYaml .Values.parser.tolerations | nindent 4 }}
{ { - toYaml .Values.parser.scopeLimiterAliases | nindent 4 } }
affinity: { { - toYaml .Values.parser.affinity | nindent 4 } }
tolerations: { { - toYaml .Values.parser.tolerations | nindent 4 } }
46 changes: 23 additions & 23 deletions auto-discovery/kubernetes/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "main.go",
"args": ["--config", "auto-discovery-config.yaml"]
"name": "Debug Main",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "main.go",
"args": ["--config", "auto-discovery-config.yaml"]
},
{
"name": "Debug Unit Tests",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/controllers",
"args": ["-test.v"],
//"preLaunchTask": "makefileMagic",
"env": {"KUBEBUILDER_ASSETS": "${workspaceFolder}/testbin/bin"}
}
]
}
{
"name": "Debug Unit Tests",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${workspaceFolder}/controllers",
"args": ["-test.v"],
//"preLaunchTask": "makefileMagic",
"env": { "KUBEBUILDER_ASSETS": "${workspaceFolder}/testbin/bin" }
}
]
}
23 changes: 13 additions & 10 deletions auto-discovery/kubernetes/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "makefileMagic",
"command": "bash",
"args": ["-c", "source ${workspaceFolder}/testbin/setup-envtest.sh && fetch_envtest_tools ${workspaceFolder}/testbin && setup_envtest_env ${workspaceFolder}/testbin"],
"type": "shell"
},
]
}
"version": "2.0.0",
"tasks": [
{
"label": "makefileMagic",
"command": "bash",
"args": [
"-c",
"source ${workspaceFolder}/testbin/setup-envtest.sh && fetch_envtest_tools ${workspaceFolder}/testbin && setup_envtest_env ${workspaceFolder}/testbin"
],
"type": "shell"
}
]
}
4 changes: 2 additions & 2 deletions auto-discovery/kubernetes/config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
- bases/config.securecodebox.io_autodiscoveryconfigs.yaml
- bases/config.securecodebox.io_autodiscoveryconfigs.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
Expand All @@ -22,4 +22,4 @@ patchesStrategicMerge:

# the following config is for teaching kustomize how to do kustomization for CRDs.
configurations:
- kustomizeconfig.yaml
- kustomizeconfig.yaml
24 changes: 12 additions & 12 deletions auto-discovery/kubernetes/config/crd/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

# This file is for teaching kustomize how to substitute name and namespace reference in CRD
nameReference:
- kind: Service
version: v1
fieldSpecs:
- kind: CustomResourceDefinition
- kind: Service
version: v1
group: apiextensions.k8s.io
path: spec/conversion/webhook/clientConfig/service/name
fieldSpecs:
- kind: CustomResourceDefinition
version: v1
group: apiextensions.k8s.io
path: spec/conversion/webhook/clientConfig/service/name

namespace:
- kind: CustomResourceDefinition
version: v1
group: apiextensions.k8s.io
path: spec/conversion/webhook/clie 52E5 ntConfig/service/namespace
create: false
- kind: CustomResourceDefinition
version: v1
group: apiextensions.k8s.io
path: spec/conversion/webhook/clientConfig/service/namespace
create: false

varReference:
- path: metadata/annotations
- path: metadata/annotations
20 changes: 10 additions & 10 deletions auto-discovery/kubernetes/config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namePrefix: auto-discovery-
# someName: someValue

bases:
- ../crd
- ../rbac
- ../manager
- ../crd
- ../rbac
- ../manager
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
#- ../webhook
Expand All @@ -29,14 +29,14 @@ bases:
#- ../prometheus

patchesStrategicMerge:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
# endpoint w/o any authn/z, please comment the following line.
- manager_auth_proxy_patch.yaml

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
- manager_config_patch.yaml
# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
- manager_config_patch.yaml

# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ spec:
template:
spec:
containers:
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
ports:
- containerPort: 8443
name: https
- name: kube-rbac-proxy
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
args:
- "--secure-listen-address=0.0.0.0:8443"
- "--upstream=http://127.0.0.1:8080/"
- "--logtostderr=true"
- "--v=10"
ports:
- containerPort: 8443
name: https
20 changes: 10 additions & 10 deletions auto-discovery/kubernetes/config/default/manager_config_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ spec:
template:
spec:
containers:
- name: manager
args:
- "--config=controller_manager_config.yaml"
volumeMounts:
- name: manager-config
mountPath: /controller_manager_config.yaml
subPath: controller_manager_config.yaml
- name: manager
args:
- "--config=controller_manager_config.yaml"
volumeMounts:
- name: manager-config
mountPath: /controller_manager_config.yaml
subPath: controller_manager_config.yaml
volumes:
- name: manager-config
configMap:
name: manager-config
- name: manager-config
configMap:
name: manager-config
8 changes: 4 additions & 4 deletions auto-discovery/kubernetes/config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# SPDX-License-Identifier: Apache-2.0

resources:
- manager.yaml
- manager.yaml

generatorOptions:
disableNameSuffixHash: true

configMapGenerator:
- name: manager-config
files:
- controller_manager_config.yaml
- name: manager-config
files:
- controller_manager_config.yaml
Loading
0