Skip to content

Commit 975a4d8

Browse files
committed
Merge branch 'main' into alpha
2 parents a93c4b5 + c64e185 commit 975a4d8

File tree

206 files changed

+1199
-1454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+1199
-1454
lines changed

.automation/build.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -522,16 +522,17 @@ def build_dockerfile(
522522
+ ' && echo "Changing owner of node_modules files…" \\\n'
523523
+ ' && chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \\\n'
524524
+ ' && echo "Removing extra node_module files…" \\\n'
525-
+ " && rm -rf /root/.npm/_cacache \\\n"
526-
+ ' && find . -name "*.d.ts" -delete \\\n'
527-
+ ' && find . -name "*.map" -delete \\\n'
528-
+ ' && find . -name "*.npmignore" -delete \\\n'
529-
+ ' && find . -name "*.travis.yml" -delete \\\n'
530-
+ ' && find . -name "CHANGELOG.md" -delete \\\n'
531-
+ ' && find . -name "README.md" -delete \\\n'
532-
+ ' && find . -name ".package-lock.json" -delete \\\n'
533-
+ ' && find . -name "package-lock.json" -delete \\\n'
534-
+ ' && find . -name "README.md" -delete\n'
525+
+ ' && find . \\( -not -path "/proc" \\)'
526+
+ ' -and \\( -type f'
527+
+ ' \\( -iname "*.d.ts"'
528+
+ ' -o -iname "*.map"'
529+
+ ' -o -iname "*.npmignore"'
530+
+ ' -o -iname "*.travis.yml"'
531+
+ ' -o -iname "CHANGELOG.md"'
532+
+ ' -o -iname "README.md"'
533+
+ ' -o -iname ".package-lock.json"'
534+
+ ' -o -iname "package-lock.json"'
535+
+ ' \\) -o -type d -name /root/.npm/_cacache \\) -delete \n'
535536
+ "WORKDIR /\n"
536537
)
537538
replace_in_file(dockerfile, "#NPM__START", "#NPM__END", npm_install_command)
@@ -543,7 +544,8 @@ def build_dockerfile(
543544
+ " PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade \\\n '"
544545
+ "' \\\n '".join(list(dict.fromkeys(pip_packages)))
545546
+ "' && \\\n"
546-
+ 'find . | grep -E "(/__pycache__$|\\.pyc$|\\.pyo$)" | xargs rm -rf && \\\n'
547+
+ r"find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete"
548+
+ " \\\n && "
547549
+ "rm -rf /root/.cache"
548550
)
549551
replace_in_file(dockerfile, "#PIP__START", "#PIP__END", pip_install_command)
@@ -569,8 +571,10 @@ def build_dockerfile(
569571
env_path_command += f":/venvs/{pip_linter}/bin"
570572
pipenv_install_command = pipenv_install_command[:-2] # remove last \
571573
pipenv_install_command += (
572-
' \\\n && find . | grep -E "(/__pycache__$|\\.pyc$|\\.pyo$)" | xargs rm -rf '
573-
+ "&& rm -rf /root/.cache\n"
574+
" \\\n && "
575+
+ r"find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete"
576+
+ " \\\n && "
577+
+ "rm -rf /root/.cache\n"
574578
+ env_path_command
575579
)
576580
else:

.automation/generated/linter-helps.json

Lines changed: 161 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.automation/generated/linter-versions.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"actionlint": "1.7.0",
3-
"ansible-lint": "24.5.0",
3+
"ansible-lint": "24.2.3",
44
"arm-ttk": "0.0.0",
55
"bandit": "1.7.8",
66
"bash-exec": "5.2.21",
77
"bicep_linter": "0.27.1",
88
"black": "24.4.2",
99
"cfn-lint": "0.87.3",
1010
"checkmake": "0.2.0",
11-
"checkov": "3.2.95",
11+
"checkov": "3.2.107",
1212
"checkstyle": "10.16.0",
1313
"chktex": "1.7.8",
1414
"clang-format": "17.0.5",
1515
"clippy": "0.1.78",
16-
"clj-kondo": "2024.03.13",
16+
"clj-kondo": "2024.05.24",
1717
"cljstyle": "0.15.0",
1818
"coffeelint": "5.2.11",
1919
"cpplint": "1.6.1",
2020
"csharpier": "0.28.2",
21-
"cspell": "8.8.1",
21+
"cspell": "8.8.3",
2222
"dartanalyzer": "0.0.0",
2323
"detekt": "1.23.5",
2424
"devskim": "1.0.33",
@@ -34,7 +34,7 @@
3434
"gherkin-lint": "0.0.0",
3535
"git_diff": "2.43.4",
3636
"gitleaks": "8.18.2",
37-
"golangci-lint": "1.58.1",
37+
"golangci-lint": "1.58.2",
3838
"goodcheck": "3.1.0",
3939
"graphql-schema-linter": "3.0.1",
4040
"grype": "0.77.4",
@@ -49,41 +49,41 @@
4949
"kubeconform": "0.6.6",
5050
"kubescape": "2.9.0",
5151
"kubeval": "0.16.1",
52-
"lightning-flow-scanner": "2.25.0",
52+
"lightning-flow-scanner": "2.26.0",
5353
"lintr": "0.0.0",
54-
"luacheck": "1.1.2",
54+
"luacheck": "1.2.0",
5555
"lychee": "0.15.1",
56-
"markdown-link-check": "3.12.1",
56+
"markdown-link-check": "3.12.2",
5757
"markdown-table-formatter": "1.6.0",
58-
"markdownlint": "0.40.0",
58+
"markdownlint": "0.41.0",
5959
"misspell": "0.3.4",
6060
"mypy": "1.10.0",
6161
"npm-groovy-lint": "14.6.0",
6262
"npm-package-json-lint": "7.1.0",
6363
"perlcritic": "1.152",
6464
"php": "7.4.26",
65-
"phpcs": "3.9.2",
65+
"phpcs": "3.10.1",
6666
"phplint": "9.3.1",
67-
"phpstan": "1.11.1",
67+
"phpstan": "1.11.2",
6868
"pmd": "7.1.0",
6969
"powershell": "7.4.2",
7070
"powershell_formatter": "7.4.2",
7171
"prettier": "3.2.5",
72-
"proselint": "0.13.0",
72+
"proselint": "0.14.0",
7373
"protolint": "0.49.7",
7474
"psalm": "Psalm.5.24.0@",
7575
"puppet-lint": "4.2.4",
76-
"pylint": "3.2.1",
77-
"pyright": "1.1.363",
76+
"pylint": "3.2.2",
77+
"pyright": "1.1.364",
7878
"raku": "2020.10",
7979
"remark-lint": "14.0.2",
8080
"revive": "1.3.7",
8181
"roslynator": "0.8.8.0",
8282
"rst-lint": "1.4.0",
8383
"rstcheck": "6.2.1",
8484
"rstfmt": "0.0.14",
85-
"rubocop": "1.63.5",
86-
"ruff": "0.4.4",
85+
"rubocop": "1.64.0",
86+
"ruff": "0.4.5",
8787
"scalafix": "0.12.1",
8888
"scss-lint": "0.60.0",
8989
"secretlint": "8.2.4",
@@ -98,18 +98,18 @@
9898
"snakemake": "8.11.6",
9999
"spectral": "6.11.1",
100100
"sql-lint": "1.0.0",
101-
"sqlfluff": "3.0.6",
101+
"sqlfluff": "3.0.7",
102102
"standard": "17.1.0",
103-
"stylelint": "16.5.0",
103+
"stylelint": "16.6.0",
104104
"swiftlint": "0.54.0",
105105
"syft": "1.4.1",
106-
"tekton-lint": "1.0.2",
107-
"terraform-fmt": "1.8.3",
108-
"terragrunt": "0.58.5",
106+
"tekton-lint": "1.1.0",
107+
"terraform-fmt": "1.8.4",
108+
"terragrunt": "0.58.9",
109109
"terrascan": "1.18.11",
110110
"tflint": "0.51.0",
111-
"trivy": "0.51.1",
112-
"trivy-sbom": "0.51.1",
111+
"trivy": "0.51.4",
112+
"trivy-sbom": "0.51.4",
113113
"trufflehog": "3.76.3",
114114
"ts-standard": "12.0.2",
115115
"tsqllint": "1.15.3.0",

.github/linters/.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,4 +461,4 @@ valid-metaclass-classmethod-first-arg=mcs
461461

462462
# Exceptions that will emit a warning when being caught. Defaults to
463463
# "Exception"
464-
overgeneral-exceptions=Exception
464+
overgeneral-exceptions=builtins.Exception

.github/workflows/build-command.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ jobs:
6969
python-version-file: '.python-version' # Read python version from a file .python-version
7070
# Used to specify a package manager for caching in the default directory. Supported values: pip, pipenv, poetry.
7171
cache: pip # optional
72-
- run: pip install -r .config/python/dev/requirements.txt
72+
- run: python -m pip install uv
73+
- run: uv pip install --system -r .config/python/dev/requirements.txt
7374
- name: Create comment starting build.sh
7475
uses: peter-evans/create-or-update-comment@v4
7576
with:

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
1919
- `API_SPECTRAL` was added as replacement for `OPENAPI_SPECTRAL` (deprecated), supporting AsyncAPI and OpenAPI by default. Uses Spectral's standard config file name `.spectral.yaml` instead of `.openapirc.yml` with a default config with rulesets for AsyncAPI and OpenAPI enabled. Fixes [#3387](https://github.com/oxsecurity/megalinter/issues/3387)
2020
- Disable SQL_TSQLLINT until security issues are solved. Related to <https://github.com/tsqllint/tsqllint/issues/333>
2121
- PHP linters (PHP_PHPCS, PHP_PHPLINT, PHP_PHPSTAN) add support to SARIF report output format with help of <https://github.com/llaville/sarif-php-sdk>
22+
- `KOTLIN_KTLINT` now supports `list_of_files` mode, and has better error counting
2223

2324
- Reporters
2425
- New ApiReporter (can be used to build Grafana dashboards)
@@ -137,6 +138,42 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
137138
- [snakemake](https://snakemake.readthedocs.io/en/stable/) from 8.11.4 to **8.11.6** on 2024-05-18
138139
- [terragrunt](https://terragrunt.gruntwork.io) from 0.58.4 to **0.58.5** on 2024-05-18
139140
- [xmllint](https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home) from 21107 to **21108** on 2024-05-18
141+
- [ansible-lint](https://ansible-lint.readthedocs.io/) from 24.5.0 to **24.2.3** on 2024-05-20
142+
- [golangci-lint](https://golangci-lint.run/) from 1.58.1 to **1.58.2** on 2024-05-20
143+
- [checkov](https://www.checkov.io/) from 3.2.95 to **3.2.97** on 2024-05-20
144+
- [lightning-flow-scanner](https://github.com/Lightning-Flow-Scanner) from 2.25.0 to **2.24.0** on 2024-05-20
145+
- [terragrunt](https://terragrunt.gruntwork.io) from 0.58.5 to **0.58.7** on 2024-05-20
146+
- [phpcs](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.9.2 to **3.10.0** on 2024-05-20
147+
- [pylint](https://pylint.readthedocs.io) from 3.2.1 to **3.2.2** on 2024-05-20
148+
- [checkov](https://www.checkov.io/) from 3.2.97 to **3.2.98** on 2024-05-20
149+
- [trivy-sbom](https://aquasecurity.github.io/trivy/) from 0.51.1 to **0.51.2** on 2024-05-20
150+
- [trivy](https://aquasecurity.github.io/trivy/) from 0.51.1 to **0.51.2** on 2024-05-20
151+
- [checkov](https://www.checkov.io/) from 3.2.98 to **3.2.99** on 2024-05-21
152+
- [checkov](https://www.checkov.io/) from 3.2.99 to **3.2.100** on 2024-05-21
153+
- [clj-kondo](https://github.com/borkdude/clj-kondo) from 2024.03.13 to **2024.05.22** on 2024-05-22
154+
- [markdown-link-check](https://github.com/tcort/markdown-link-check) from 3.12.1 to **3.12.2** on 2024-05-22
155+
- [phpcs](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.10.0 to **3.10.1** on 2024-05-22
156+
- [pyright](https://github.com/Microsoft/pyright) from 1.1.363 to **1.1.364** on 2024-05-22
157+
- [checkov](https://www.checkov.io/) from 3.2.100 to **3.2.105** on 2024-05-22
158+
- [cspell](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell) from 8.8.1 to **8.8.2** on 2024-05-22
159+
- [ruff](https://github.com/astral-sh/ruff) from 0.4.4 to **0.4.5** on 2024-05-24
160+
- [checkov](https://www.checkov.io/) from 3.2.105 to **3.2.106** on 2024-05-24
161+
- [rubocop](https://rubocop.org/) from 1.63.5 to **1.64.0** on 2024-05-24
162+
- [lightning-flow-scanner](https://github.com/Lightning-Flow-Scanner) from 2.24.0 to **2.26.0** on 2024-05-24
163+
- [cspell](https://github.com/streetsidesoftware/cspell/tree/master/packages/cspell) from 8.8.2 to **8.8.3** on 2024-05-24
164+
- [proselint](https://github.com/amperser/proselint) from 0.13.0 to **0.14.0** on 2024-05-24
165+
- [sqlfluff](https://www.sqlfluff.com/) from 3.0.6 to **3.0.7** on 2024-05-24
166+
- [clj-kondo](https://github.com/borkdude/clj-kondo) from 2024.05.22 to **2024.05.24** on 2024-05-25
167+
- [stylelint](https://stylelint.io) from 16.5.0 to **16.6.0** on 2024-05-25
168+
- [luacheck](https://luacheck.readthedocs.io) from 1.1.2 to **1.2.0** on 2024-05-25
169+
- [phpstan](https://phpstan.org/) from 1.11.1 to **1.11.2** on 2024-05-25
170+
- [checkov](https://www.checkov.io/) from 3.2.106 to **3.2.107** on 2024-05-25
171+
- [trivy-sbom](https://aquasecurity.github.io/trivy/) from 0.51.2 to **0.51.4** on 2024-05-25
172+
- [trivy](https://aquasecurity.github.io/trivy/) from 0.51.2 to **0.51.4** on 2024-05-25
173+
- [tekton-lint](https://github.com/IBM/tekton-lint) from 1.0.2 to **1.1.0** on 2024-05-25
174+
- [terraform-fmt](https://developer.hashicorp.com/terraform/cli/commands/fmt) from 1.8.3 to **1.8.4** on 2024-05-25
175+
- [terragrunt](https://terragrunt.gruntwork.io) from 0.58.7 to **0.58.9** on 2024-05-25
176+
- [markdownlint](https://github.com/DavidAnson/markdownlint) from 0.40.0 to **0.41.0** on 2024-05-26
140177
<!-- linter-versions-end -->
141178

142179
## [v7.11.1] - 2024-04-23

Dockerfile

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ RUN PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir --upgrade pip virtuale
200200
&& mkdir -p "/venvs/proselint" && cd "/venvs/proselint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir proselint && deactivate && cd ./../.. \
201201
&& mkdir -p "/venvs/sqlfluff" && cd "/venvs/sqlfluff" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir sqlfluff && deactivate && cd ./../.. \
202202
&& mkdir -p "/venvs/yamllint" && cd "/venvs/yamllint" && virtualenv . && source bin/activate && PYTHONDONTWRITEBYTECODE=1 pip3 install --no-cache-dir yamllint && deactivate && cd ./../.. \
203-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf && rm -rf /root/.cache
203+
&& find /venvs \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete \
204+
&& rm -rf /root/.cache
204205
ENV PATH="${PATH}":/venvs/ansible-lint/bin:/venvs/cpplint/bin:/venvs/cfn-lint/bin:/venvs/djlint/bin:/venvs/pylint/bin:/venvs/black/bin:/venvs/flake8/bin:/venvs/isort/bin:/venvs/bandit/bin:/venvs/mypy/bin:/venvs/pyright/bin:/venvs/ruff/bin:/venvs/checkov/bin:/venvs/semgrep/bin:/venvs/rst-lint/bin:/venvs/rstcheck/bin:/venvs/rstfmt/bin:/venvs/snakemake/bin:/venvs/snakefmt/bin:/venvs/proselint/bin:/venvs/sqlfluff/bin:/venvs/yamllint/bin
205206
#PIPVENV__END
206207

@@ -267,16 +268,7 @@ RUN npm --no-cache install --ignore-scripts --omit=dev \
267268
&& echo "Changing owner of node_modules files…" \
268269
&& chown -R "$(id -u)":"$(id -g)" node_modules # fix for https://github.com/npm/cli/issues/5900 \
269270
&& echo "Removing extra node_module files…" \
270-
&& rm -rf /root/.npm/_cacache \
271-
&& find . -name "*.d.ts" -delete \
272-
&& find . -name "*.map" -delete \
273-
&& find . -name "*.npmignore" -delete \
274-
&& find . -name "*.travis.yml" -delete \
275-
&& find . -name "CHANGELOG.md" -delete \
276-
&& find . -name "README.md" -delete \
277-
&& find . -name ".package-lock.json" -delete \
278-
&& find . -name "package-lock.json" -delete \
279-
&& find . -name "README.md" -delete
271+
&& find . \( -not -path "/proc" \) -and \( -type f \( -iname "*.d.ts" -o -iname "*.map" -o -iname "*.npmignore" -o -iname "*.travis.yml" -o -iname "CHANGELOG.md" -o -iname "README.md" -o -iname ".package-lock.json" -o -iname "package-lock.json" \) -o -type d -name /root/.npm/_cacache \) -delete
280272
WORKDIR /
281273

282274
#NPM__END
@@ -344,7 +336,7 @@ COPY --link --from=terragrunt /bin/terraform /usr/bin/
344336
#OTHER__START
345337
RUN rc-update add docker boot && rc-service docker start || true \
346338
# ARM installation
347-
&& curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell-7.4.1-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \
339+
&& curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell-7.4.2-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \
348340
&& mkdir -p /opt/microsoft/powershell/7 \
349341
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \
350342
&& chmod +x /opt/microsoft/powershell/7/pwsh \
@@ -471,18 +463,19 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI
471463
ENV PATH="/root/.composer/vendor/bin:${PATH}"
472464

473465
# POWERSHELL installation
474-
RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell-7.4.2-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \
475-
&& mkdir -p /opt/microsoft/powershell/7 \
476-
&& tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \
477-
&& chmod +x /opt/microsoft/powershell/7/pwsh \
478-
&& ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \
466+
# Next line commented because already managed by another linter
467+
# RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.4.2/powershell-7.4.2-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \
468+
# && mkdir -p /opt/microsoft/powershell/7 \
469+
# && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \
470+
# && chmod +x /opt/microsoft/powershell/7/pwsh \
471+
# && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
479472

480473
# SALESFORCE installation
481474
# Next line commented because already managed by another linter
482475
# ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk
483476
# Next line commented because already managed by another linter
484477
# ENV PATH="$JAVA_HOME/bin:${PATH}"
485-
&& sf plugins install @salesforce/plugin-packaging \
478+
RUN sf plugins install @salesforce/plugin-packaging \
486479
&& echo y|sf plugins install sfdx-hardis \
487480
&& npm cache clean --force || true \
488481
&& rm -rf /root/.npm/_cacache \
@@ -727,7 +720,7 @@ RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh |
727720
# && rm -rf /root/.npm/_cacache
728721

729722
# lightning-flow-scanner installation
730-
&& echo y|sf plugins install lightning-flow-scanner@2.24.0 \
723+
&& echo y|sf plugins install lightning-flow-scanner \
731724
&& npm cache clean --force || true \
732725
&& rm -rf /root/.npm/_cacache \
733726

@@ -761,7 +754,7 @@ COPY megalinter /megalinter
761754
RUN PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py install \
762755
&& PYTHONDONTWRITEBYTECODE=1 python /megalinter/setup.py clean --all \
763756
&& rm -rf /var/cache/apk/* \
764-
&& find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
757+
&& find . \( -type f \( -iname \*.pyc -o -iname \*.pyo \) -o -type d -iname __pycache__ \) -delete
765758

766759
#######################################
767760
# Copy scripts and rules to container #

0 commit comments

Comments
 (0)