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

[automation] Auto-update linters version, help and documentation #1597

Merged
merged 32 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9da34fb
[automation] Auto-update linters version, help and documentation
nvuillam Jul 13, 2022
122aa2d
[MegaLinter] Apply linters fixes
nvuillam Jul 13, 2022
5d5955d
Fix build issues
nvuillam Jul 14, 2022
7cd59d3
Build doc
nvuillam Jul 14, 2022
251b94b
[automation] Auto-update linters version, help and documentation
nvuillam Jul 14, 2022
e8a12e6
[MegaLinter] Apply linters fixes
nvuillam Jul 14, 2022
583d81c
[MegaLinter] Apply linters fixes
nvuillam Jul 14, 2022
5517fdf
Fix SARIF count
nvuillam Jul 14, 2022
7060cba
Merge branch 'bugs/pr' into create-pull-request/patch
nvuillam Jul 14, 2022
e0e7309
Disable trivy in PR DEV job (now secured by Ox)
nvuillam Jul 14, 2022
12fceae
DevSkim: Ignore megalinter-reports
nvuillam Jul 14, 2022
622313f
Fix build.py for DOCKERFILE_DOCKERFILELINT
nvuillam Jul 14, 2022
99a9f32
Fix SARIF
nvuillam Jul 14, 2022
c1d25f8
Fix SARIF reading
nvuillam Jul 14, 2022
c913a94
Fix SARIF test method
nvuillam Jul 14, 2022
a3e90d2
Fix counting sarif errors
nvuillam Jul 14, 2022
1ebdda6
[MegaLinter] Apply linters fixes
nvuillam Jul 14, 2022
aede472
Merge branch 'create-pull-request/patch' into bugs/devskim-ignore
nvuillam Jul 14, 2022
0e92a7c
elif
nvuillam Jul 14, 2022
a94d5ce
Merge branch 'bugs/devskim-ignore' into create-pull-request/patch
nvuillam Jul 14, 2022
a5e49da
Merge branch 'create-pull-request/patch' into bugs/pre-commands-env
nvuillam Jul 14, 2022
3831772
Load JSON when list obj objects in env vars
nvuillam Jul 14, 2022
a74ca97
Merge branch 'bugs/pre-commands-env' into create-pull-request/patch
nvuillam Jul 14, 2022
a1233b2
changelog
nvuillam Jul 14, 2022
44296fd
Update secretlint test cases
nvuillam Jul 14, 2022
9ef1fc6
[MegaLinter] Apply linters fixes
nvuillam Jul 14, 2022
eb3d8dd
AutoFix pre_commands using npm install
nvuillam Jul 14, 2022
1f54c2a
Fix SARIF test class again
nvuillam Jul 14, 2022
0993408
Also get errors number from SARIF invocations
nvuillam Jul 14, 2022
2c3dc8c
Fix againnnn
nvuillam Jul 14, 2022
be9dbef
Fix test cases
nvuillam Jul 14, 2022
44fae45
Linter fixes
nvuillam Jul 14, 2022
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
8 changes: 8 additions & 0 deletions .automation/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2123,7 +2123,15 @@ def generate_json_schema_enums():
json_schema["definitions"]["enum_descriptor_keys"]["enum"] = [
x["descriptor_id"] for x in descriptors
]
json_schema["definitions"]["enum_descriptor_keys"]["enum"] += ["CREDENTIALS", "GIT"]
json_schema["definitions"]["enum_linter_keys"]["enum"] = [x.name for x in linters]
json_schema["definitions"]["enum_linter_keys"]["enum"] += [
"CREDENTIALS_SECRETLINT",
"DOCKERFILE_DOCKERFILELINT",
"GIT_GIT_DIFF",
"PHP_BUILTIN",
"RST_RSTFMT",
]
with open(CONFIG_JSON_SCHEMA, "w", encoding="utf-8") as outfile:
json.dump(json_schema, outfile, indent=2, sort_keys=True)
outfile.write("\n")
Expand Down
478 changes: 239 additions & 239 deletions .automation/generated/linter-helps.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions .automation/generated/linter-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bash-exec": "5.1.16",
"black": "22.6.0",
"cfn-lint": "0.61.2",
"checkov": "2.1.43",
"checkov": "2.1.54",
"checkstyle": "10.3.1",
"chktex": "1.7.6",
"clippy": "0.1.62",
Expand All @@ -25,7 +25,7 @@
"eslint-plugin-jsonc": "2.3.1",
"flake8": "4.0.1",
"gherkin-lint": "0.0.0",
"git_diff": "2.34.2",
"git_diff": "2.34.4",
"gitleaks": "8.8.7",
"golangci-lint": "1.46.2",
"goodcheck": "3.1.0",
Expand All @@ -51,7 +51,7 @@
"php": "7.4.26",
"phpcs": "3.7.1",
"phplint": "3.0",
"phpstan": "1.8.0",
"phpstan": "1.8.1",
"powershell": "7.2.5",
"prettier": "2.7.1",
"protolint": "0.38.2",
Expand Down Expand Up @@ -79,11 +79,11 @@
"snakemake": "7.8.5",
"spectral": "5.9.2",
"sql-lint": "1.0.0",
"sqlfluff": "1.1.0",
"sqlfluff": "1.2.0",
"standard": "15.0.1",
"stylelint": "14.9.1",
"swiftlint": "0.46.5",
"syft": "0.50.0",
"syft": "0.51.0",
"tekton-lint": "0.6.0",
"terraform-fmt": "1.2.4",
"terragrunt": "0.38.4",
Expand Down
308 changes: 154 additions & 154 deletions .automation/generated/megalinter-users.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .automation/test/credentials/bad/.npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
//npm.pkg.github.com/:_authToken=111111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
@example:registry="https://npm.pkg.github.com"
//npm.pkg.github.com/:_authToken=111111aaaaaaaaaaaaaaaaaaaaaaaaaaabbbb
2 changes: 2 additions & 0 deletions .automation/test/credentials/bad/.npmrc2
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//npm.pkg.github.com/:_authToken=111111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
@example:registry="https://npm.pkg.github.com"
2 changes: 2 additions & 0 deletions .automation/test/docker/bad/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from node:latest

USER root

# Create app directory
run mkdir -p /usr/src/app
WORKDIR /usr/src/app
Expand Down
3 changes: 3 additions & 0 deletions .automation/test/golang/golang_bad_02.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if len(in) == 0 {
return "", fmt.Errorf("Input is empty")
}
4 changes: 4 additions & 0 deletions .automation/test/terraform/bad/terraform_bad_2.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "aws_instance" "bad" {
ami = "ami-0ff8a91507f77f867"
instance_type = # invalid type!
}
23 changes: 12 additions & 11 deletions .github/workflows/deploy-DEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,15 @@ jobs:
##############################################
# Check Docker image security with Trivy #
##############################################
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "docker.io/oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}"
format: 'table'
exit-code: '1'
ignore-unfixed: true
security-checks: vuln
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
timeout: 10m0s

# - name: Run Trivy vulnerability scanner
# uses: aquasecurity/trivy-action@master
# with:
# image-ref: "docker.io/oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}"
# format: 'table'
# exit-code: '1'
# ignore-unfixed: true
# security-checks: vuln
# vuln-type: 'os,library'
# severity: 'CRITICAL,HIGH'
# timeout: 10m0s
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

Note: Can be used with `megalinter/megalinter@beta` in your GitHub Action mega-linter.yml file, or with `megalinter/megalinter:beta` docker image

- Fix count of errors when using SARIF reporter
- DevSkim: Ignore megalinter-reports by default [(#1603)](https://github.com/oxsecurity/megalinter/issues/1603)
- Load JSON when list of objects is defined in an ENV var [(#1605)](https://github.com/oxsecurity/megalinter/issues/1605)
- AutoFix pre_commands using `npm install` [(1258)](https://github.com/oxsecurity/megalinter/issues/1258)

- Linter versions upgrades
- [phpstan](https://phpstan.org/) from 1.8.0 to **1.8.1** on 2022-07-14
- [git_diff](https://git-scm.com) from 2.34.2 to **2.34.4** on 2022-07-14
- [syft](https://github.com/anchore/syft) from 0.50.0 to **0.51.0** on 2022-07-14
- [sqlfluff](https://www.sqlfluff.com/) from 1.1.0 to **1.2.0** on 2022-07-14
- [checkov](https://www.checkov.io/) from 2.1.43 to **2.1.54** on 2022-07-14
<!-- linter-versions-end -->

## [v6.0.3] - 2022-07-11
Expand Down
10 changes: 5 additions & 5 deletions docs/all_linters.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/descriptors/php_phpstan.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## phpstan documentation

- Version in MegaLinter: **1.8.0**
- Version in MegaLinter: **1.8.1**
- Visit [Official Web Site](https://phpstan.org/){target=_blank}
- See [How to configure phpstan rules](https://phpstan.org/config-reference#neon-format){target=_blank}
- If custom `phpstan.neon.dist` config file is not found, [phpstan.neon.dist](https://github.com/oxsecurity/megalinter/tree/main/TEMPLATES/phpstan.neon.dist){target=_blank} will be used
Expand Down
4 changes: 2 additions & 2 deletions docs/descriptors/python_black.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ Options:
input).
--python-cell-magics TEXT When processing Jupyter Notebooks, add the
given magic to the list of known python-
magics (pypy, python3, capture, prun,
timeit, python, time). Useful for formatting
magics (python, timeit, capture, time,
python3, pypy, prun). Useful for formatting
cells with custom python magics.
-S, --skip-string-normalization
Don't normalize string quotes or prefixes.
Expand Down
4 changes: 2 additions & 2 deletions docs/descriptors/python_flake8.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ options:
of opening bracket's line.
--ignore errors Comma-separated list of errors and warnings to ignore
(or skip). For example, ``--ignore=E4,E51,W234``.
(Default: ['E704', 'W504', 'E123', 'E121', 'W503',
'E226', 'E126', 'E24'])
(Default: ['E123', 'W504', 'W503', 'E226', 'E121',
'E704', 'E24', 'E126'])
--extend-ignore errors
Comma-separated list of errors and warnings to add to
the list of ignored ones. For example, ``--extend-
Expand Down
Loading