diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 180e1be8efb..a56b4cee6bc 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,67 +1,28 @@ # Contributing :wave: Hi there! -We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great. -## Submitting a pull request - -[Pull Requests][pulls] are used for adding new playbooks, roles, and documents to the repository, or editing the existing ones. - -**With write access** - -1. Clone the repository (only if you have write access) -1. Create a new branch: `git checkout -b my-branch-name` -1. Make your change -1. Push and [submit a pull request][pr] -1. Pat yourself on the back and wait for your pull request to be reviewed and merged. - -**Without write access** - -1. [Fork][fork] and clone the repository -1. Create a new branch: `git checkout -b my-branch-name` -1. Make your change -1. Push to your fork and [submit a pull request][pr] -1. Pat your self on the back and wait for your pull request to be reviewed and merged. - -Here are a few things you can do that will increase the likelihood of your pull request being accepted: +We're thrilled that you'd like to contribute to this project. +Your help is essential for keeping it great. -- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests. -- Write [good commit messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). - -Draft pull requests are also welcome to get feedback early on, or if there is something blocking you. - -- Create a branch with a name that identifies the user and nature of the changes (similar to `user/branch-purpose`) -- Open a pull request - -### CI/CT/CD - -The **Super-Linter** has _CI/CT/CD_ configured utilizing **GitHub** Actions. +## Submitting a pull request -- When a branch is created and code is pushed, a **GitHub** Action is triggered for building the new **Docker** container with the new codebase -- The **Docker** container is then ran against the _test cases_ to validate all code sanity - - `.automation/test` contains all test cases for each language that should be validated -- These **GitHub** Actions utilize the Checks API and Protected Branches to help follow the SDLC -- When the Pull Request is merged to main, the **Super-Linter** **Docker** container is then updated and deployed with the new codebase - - **Note:** The branch's **Docker** container is also removed from **DockerHub** to cleanup after itself +We use [pull requests](https://github.com/super-linter/super-linter/pulls) to +contribute new features, fixes, or documentation. -## Releasing +Here are a few things you can do that will increase the likelihood of your pull +request being accepted: -If you are the current maintainer of this action you can create releases from the `Release` page of the repository. +- Keep your change as focused as possible. If there are multiple changes you + would like to make that are not dependent upon each other, submit them as + separate pull requests. +- Write [descriptive commit messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html). -- It will notify the issue it has seen the information and starts the Actions job -- It will create a branch and update the `actions.yml` with the new version supplied to the issue -- It will then create a PR with the updated code -- It will then create the build the artifacts needed -- it will then publish the release and merge the PR -- A GitHub Action will Publish the Docker image to GitHub Package Registry once a Release is created -- A GitHub Action will Publish the Docker image to Docker Hub once a Release is created +Draft pull requests are also welcome to get feedback early on, or if there is +something blocking you. ## Resources - [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) - [Using Pull Requests](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) - [GitHub Help](https://docs.github.com/en) - -[pulls]: https://github.com/super-linter/super-linter/pulls -[pr]: https://github.com/super-linter/super-linter/compare -[fork]: https://github.com/super-linter/super-linter/fork diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index f53f7c15e47..41e9a04ce68 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,7 +9,7 @@ body: value: | Thanks for taking the time to fill out this feature request! If this is a request to add a new language, after submitting this issue - check out [the wiki](https://github.com/super-linter/super-linter/wiki/Adding-new-language-support-to-Super-Linter) + check out [the instructions](https://github.com/super-linter/super-linter/blob/main/docs/add-new-linter.md) for more information on how to accomplish that. - type: checkboxes attributes: diff --git a/.github/linters/.sqlfluff b/.github/linters/.sqlfluff index 27216cf8c34..125435274ab 100644 --- a/.github/linters/.sqlfluff +++ b/.github/linters/.sqlfluff @@ -1,8 +1,8 @@ ## This /.sqlfluff file can be used to configure the SQLFluff linter when -## used via the GitHub Super Linter. Copy it to the .github/linters folder of +## used via the Super Linter. Copy it to the .github/linters folder of ## your repo, and uncomment the necessary lines to configure the Super Linter. ## -## IMPORTANT NOTE: The GitHub Super Linter configuration file for SQLFluff +## IMPORTANT NOTE: The Super Linter configuration file for SQLFluff ## supersedes any local configuration files you might have in within your ## codebase. For this reason it should only be used when you want the same ## configuration for your entire code base. If you need different configuration diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8e4d5504533..274f427ef36 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -93,32 +93,6 @@ jobs: - name: Run Test Suite run: make test - - name: Run Super-Linter Tests - run: | - docker run \ - -e RUN_LOCAL=true \ - -e TEST_CASE_RUN=true \ - -e ANSIBLE_DIRECTORY=.automation/test/ansible \ - -e ACTIONS_RUNNER_DEBUG=true \ - -e DEFAULT_BRANCH=main \ - -e RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES="default.json,hoge.json" \ - -e ERROR_ON_MISSING_EXEC_BIT=true \ - -e TYPESCRIPT_STANDARD_TSCONFIG_FILE=".github/linters/tsconfig.json" \ - -v "${GITHUB_WORKSPACE}:/tmp/lint" \ - "${CONTAINER_IMAGE_ID}" - - - name: Lint Entire Codebase - run: | - docker run \ - -e RUN_LOCAL=true \ - -e OUTPUT_DETAILS=detailed \ - -e ACTIONS_RUNNER_DEBUG=true \ - -e DEFAULT_BRANCH=main \ - -e RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES="default.json,hoge.json" \ - -e ERROR_ON_MISSING_EXEC_BIT=true \ - -v "${GITHUB_WORKSPACE}:/tmp/lint" \ - "${CONTAINER_IMAGE_ID}" - - name: Login to GHCR uses: docker/login-action@v3.0.0 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71c0117af1b..66670a838bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -113,28 +113,3 @@ jobs: - name: Run Test Suite run: make test - - - name: Run Super-Linter Tests - run: | - docker run \ - -e RUN_LOCAL=true \ - -e TEST_CASE_RUN=true \ - -e ANSIBLE_DIRECTORY=.automation/test/ansible \ - -e ACTIONS_RUNNER_DEBUG=true \ - -e DEFAULT_BRANCH=main \ - -e RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES="default.json,hoge.json" \ - -e ERROR_ON_MISSING_EXEC_BIT=true \ - -e TYPESCRIPT_STANDARD_TSCONFIG_FILE=".github/linters/tsconfig.json" \ - -v "${GITHUB_WORKSPACE}:/tmp/lint" \ - "${CONTAINER_IMAGE_ID}" - - - name: Lint Entire Codebase - run: | - docker run \ - -e RUN_LOCAL=true \ - -e ACTIONS_RUNNER_DEBUG=true \ - -e DEFAULT_BRANCH=main \ - -e RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES="default.json,hoge.json" \ - -e ERROR_ON_MISSING_EXEC_BIT=true \ - -v "${GITHUB_WORKSPACE}:/tmp/lint" \ - "${CONTAINER_IMAGE_ID}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 200252f3b36..d38670c3d8f 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -33,7 +33,7 @@ jobs: timeout-minutes: 60 steps: - name: Mark issue stale - uses: actions/stale@v8 + uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue.\n\nIf you're a maintainer, you can stop the bot to mark this issue as stale in the future by adding the `O: backlog 🤖` label`." diff --git a/.gitignore b/.gitignore index a1afcd545c7..141fa543f13 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,11 @@ super-linter.report # Test reports test/reports + +# Developer credentials +.github-personal-access-token + +# Test leftovers +.lintr +.automation/test/rust_clippy/**/Cargo.lock +.automation/test/rust_clippy/**/target/** diff --git a/Dockerfile b/Dockerfile index c491bbac850..8834d03d779 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ FROM dotenvlinter/dotenv-linter:3.3.0 as dotenv-linter FROM ghcr.io/awkbar-devops/clang-format:v1.0.2 as clang-format FROM ghcr.io/terraform-linters/tflint-bundle:v0.48.0.0 as tflint FROM ghcr.io/yannh/kubeconform:v0.6.4 as kubeconfrm -FROM golang:1.21.4-alpine as golang +FROM golang:1.21.5-alpine as golang FROM golangci/golangci-lint:v1.55.2 as golangci-lint FROM hadolint/hadolint:latest-alpine as dockerfile-lint FROM hashicorp/terraform:1.6.5 as terraform diff --git a/Makefile b/Makefile index 6cef671e8aa..a83653919bf 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ all: info docker test ## Run all targets. .PHONY: test -test: info validate-container-image-labels inspec test-find ## Run tests +test: info validate-container-image-labels inspec lint-codebase test-find test-linters ## Run the test suite # if this session isn't interactive, then we don't want to allocate a # TTY, which would fail, but if it is interactive, we do want to attach @@ -63,6 +63,8 @@ ifeq ($(BUILD_VERSION),) BUILD_VERSION := $(shell git rev-parse HEAD) endif +GITHUB_TOKEN_PATH := "$(CURDIR)/.github-personal-access-token" + .PHONY: inspec inspec: inspec-check ## Run InSpec tests DOCKER_CONTAINER_STATE="$$(docker inspect --format "{{.State.Running}}" $(SUPER_LINTER_TEST_CONTAINER_NAME) 2>/dev/null || echo "")"; \ @@ -85,12 +87,12 @@ inspec: inspec-check ## Run InSpec tests .phony: docker docker: ## Build the container image - @if [ -z "${GITHUB_TOKEN}" ]; then echo "GITHUB_TOKEN environment variable not set. Please set your GitHub Personal Access Token."; exit 1; fi + @if [ ! -f "${GITHUB_TOKEN_PATH}" ]; then echo "Cannot find the file to load the GitHub access token: $(GITHUB_TOKEN_PATH). Create a readable file there, and populate it with a GitHub personal access token."; exit 1; fi DOCKER_BUILDKIT=1 docker buildx build --load \ --build-arg BUILD_DATE=$(BUILD_DATE) \ --build-arg BUILD_REVISION=$(BUILD_REVISION) \ --build-arg BUILD_VERSION=$(BUILD_VERSION) \ - --secret id=GITHUB_TOKEN,env=GITHUB_TOKEN \ + --secret id=GITHUB_TOKEN,src=$(GITHUB_TOKEN_PATH) \ -t $(SUPER_LINTER_TEST_CONTAINER_URL) . .phony: docker-pull @@ -111,7 +113,35 @@ test-find: ## Run super-linter on a subdirectory with USE_FIND_ALGORITHM=true -e RUN_LOCAL=true \ -e ACTIONS_RUNNER_DEBUG=true \ -e ERROR_ON_MISSING_EXEC_BIT=true \ + -e ENABLE_GITHUB_ACTIONS_GROUP_TITLE=true \ -e DEFAULT_BRANCH=main \ -e USE_FIND_ALGORITHM=true \ -v "$(CURDIR)/.github":/tmp/lint \ $(SUPER_LINTER_TEST_CONTAINER_URL) + +.phony: lint-codebase +lint-codebase: ## Lint the entire codebase + docker run \ + -e RUN_LOCAL=true \ + -e ACTIONS_RUNNER_DEBUG=true \ + -e DEFAULT_BRANCH=main \ + -e ENABLE_GITHUB_ACTIONS_GROUP_TITLE=true \ + -e ERROR_ON_MISSING_EXEC_BIT=true \ + -e RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES="default.json,hoge.json" \ + -v "$(CURDIR):/tmp/lint" \ + $(SUPER_LINTER_TEST_CONTAINER_URL) + +.phony: test-linters +test-linters: ## Run the linters test suite + docker run \ + -e ACTIONS_RUNNER_DEBUG=true \ + -e ANSIBLE_DIRECTORY=.automation/test/ansible \ + -e DEFAULT_BRANCH=main \ + -e ENABLE_GITHUB_ACTIONS_GROUP_TITLE=true \ + -e ERROR_ON_MISSING_EXEC_BIT=true \ + -e RENOVATE_SHAREABLE_CONFIG_PRESET_FILE_NAMES="default.json,hoge.json" \ + -e RUN_LOCAL=true \ + -e TEST_CASE_RUN=true \ + -e TYPESCRIPT_STANDARD_TSCONFIG_FILE=".github/linters/tsconfig.json" \ + -v "$(CURDIR):/tmp/lint" \ + $(SUPER_LINTER_TEST_CONTAINER_URL) diff --git a/README.md b/README.md index 0d3abf44eda..83e8f6e31bf 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,25 @@ # Super-Linter -This repository is for the **GitHub Action** to run a **Super-Linter**. -It is a simple combination of various linters, written in `bash`, to help validate your source code. - -**The end goal of this tool:** - -- Prevent broken code from being uploaded to the default branch (_Usually_ `master` or `main`) -- Help establish coding best practices across multiple languages -- Build guidelines for code layout and format -- Automate the process to help streamline code reviews - -## Table of Contents - -- [Super-Linter](#super-linter) - - [Table of Contents](#table-of-contents) - - [How it Works](#how-it-works) - - [Supported Linters](#supported-linters) - - [How to use](#how-to-use) - - [Example connecting GitHub Action Workflow](#example-connecting-github-action-workflow) - - [Add Super-Linter badge in your repository README](#add-super-linter-badge-in-your-repository-readme) - - [Images](#images) - - [Standard Image](#standard-image) - - [Slim Image](#slim-image) - - [Environment variables](#environment-variables) - - [Template rules files](#template-rules-files) - - [Using your own rules files](#using-your-own-rules-files) - - [Disabling rules](#disabling-rules) - - [Using your own SSH key](#using-your-own-ssh-key) - - [Filter linted files](#filter-linted-files) - - [Run Super-Linter outside GitHub Actions](#run-super-linter-outside-github-actions) - - [Local (troubleshooting/debugging/enhancements)](#local-troubleshootingdebuggingenhancements) - - [Azure](#azure) - - [GitLab](#gitlab) - - [Codespaces and Visual Studio Code](#codespaces-and-visual-studio-code) - - [SSL Certs](#ssl-certs) - - [Limitations](#limitations) - - [How to contribute](#how-to-contribute) - - [License](#license) - -## How it Works - -The super-linter finds issues and reports them to the console output. Fixes are suggested in the console output but not automatically fixed, and a status check will show up as failed on the pull request. - -The design of the **Super-Linter** is currently to allow linting to occur in **GitHub Actions** as a part of continuous integration occurring on pull requests as the commits get pushed. It works best when commits are being pushed early and often to a branch with an open or draft pull request. There is some desire to move this closer to local development for faster feedback on linting errors but this is not yet supported. - -## Supported Linters - -Developers on **GitHub** can call the **GitHub Action** to lint their codebase with the following list of linters: +This repository is for the **GitHub Action** to run a **Super-Linter**, a +ready-to-run collection of linters and code analyzers, to help validate your +source code. + +The goal of super-linter is to help you establish best practices and consistent +formatting across multiple programming languages, and ensure developers are +adhering to those conventions. + +Super-linter analyzes source code files using several tools, and reports the +issues that those tools find as console output, and as +[GitHub Actions status checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks). + +Super-linter is licensed under a +[MIT License](https://github.com/super-linter/super-linter/blob/main/LICENSE). + +[![Super-Linter](https://github.com/super-linter/super-linter/actions/workflows/cd.yml/badge.svg)](https://github.com/marketplace/actions/super-linter) + +## Supported linters and code analyzers + +Super-linter supports the following tools: | _Language_ | _Linter_ | |----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -101,178 +74,81 @@ Developers on **GitHub** can call the **GitHub Action** to lint their codebase w | **XML** | [LibXML](http://xmlsoft.org/) | | **YAML** | [YamlLint](https://github.com/adrienverge/yamllint) | -## How to use +## Get started More in-depth [tutorial](https://www.youtube.com/watch?v=EDAmFKO4Zt0&t=118s) available -To use this **GitHub** Action you will need to complete the following: - -1. Create a new file in your repository called `.github/workflows/linter.yml` -2. Copy the example workflow from below into that new file, no extra configuration required -3. Commit that file to a new branch -4. Open up a pull request and observe the action working -5. Enjoy your more _stable_, and _cleaner_ codebase -6. Check out the [Wiki](https://github.com/super-linter/super-linter/wiki) for customization options - -**NOTE:** If you pass the _Environment_ variable `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}` in your workflow, then the **GitHub Super-Linter** will mark the status of each individual linter run in the Checks section of a pull request. Without this you will only see the overall status of the full run. There is no need to set the **GitHub** Secret as it is automatically set by GitHub, it only needs to be passed to the action. - -### Example connecting GitHub Action Workflow - -In your repository you should have a `.github/workflows` folder with **GitHub** Action similar to below: - -- `.github/workflows/linter.yml` - - Example file can be found at [`TEMPLATES/linter.yml`](TEMPLATES/linter.yml) - -This file should have the following code: - -```yml ---- -################################# -################################# -## Super Linter GitHub Actions ## -################################# -################################# -name: Lint Code Base - -############################# -# Start the job on all push # -############################# -on: - push: - branches-ignore: [master, main] - # Remove the line above to run when pushing to master or main - pull_request: - branches: [master, main] - -############### -# Set the Job # -############### -jobs: - build: - # Name the Job - name: Lint Code Base - # Set the agent to run on - runs-on: ubuntu-latest - - ############################################ - # Grant status permission for MULTI_STATUS # - ############################################ - permissions: - contents: read - packages: read - statuses: write - - ################## - # Load all steps # - ################## - steps: - ########################## - # Checkout the code base # - ########################## - - name: Checkout Code - uses: actions/checkout@v4 - with: - # Full git history is needed to get a proper - # list of changed files within `super-linter` - fetch-depth: 0 - - ################################ - # Run Linter against code base # - ################################ - - name: Lint Code Base - uses: super-linter/super-linter@v5 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -``` +To run super-linter as a GitHub Action, you do the following: -### Add Super-Linter badge in your repository README +1. Create a new [GitHub Actions workflow](https://docs.github.com/en/actions/using-workflows/about-workflows#about-workflows) in your repository with the following content: -You can show Super-Linter status with a badge in your repository README + ```yaml + --- + name: Lint -[![GitHub Super-Linter](https://github.com/super-linter/super-linter/actions/workflows/ci.yml/badge.svg)](https://github.com/marketplace/actions/super-linter) + on: # yamllint disable-line rule:truthy + push: null + pull_request: null -Format: + jobs: + build: + name: Lint + runs-on: ubuntu-latest -```markdown -[![GitHub Super-Linter](https://github.com///actions/workflows//badge.svg)](https://github.com/marketplace/actions/super-linter) -``` - -Example: + permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write -```markdown -[![GitHub Super-Linter](https://github.com/super-linter/super-linter/actions/workflows/ci.yml/badge.svg)](https://github.com/marketplace/actions/super-linter) -``` + steps: + - name: Checkout code + uses: actions/checkout@v4 -### Images + - name: Super-linter + uses: super-linter/super-linter@v5 + env: + DEFAULT_BRANCH: main + # To report GitHub Actions status checks + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ... + ``` -The **GitHub Super-Linter** now builds and supports `multiple` images. We have found as we added more linters, the image size expanded drastically. -After further investigation, we were able to see that a few linters were very disk heavy. We removed those linters and created the `slim` image. -This allows users to choose which **Super-Linter** they want to run and potentially speed up their build time. -The available images: +1. Commit that file to a new branch. +1. Push the new commit to the remote repository. +1. Create a new pull request to observe the results. -- `super-linter/super-linter:v5` -- `super-linter/super-linter:slim-v5` +## Add Super-Linter badge in your repository README -#### Standard Image +You can show Super-Linter status with a badge in your repository README: -The standard `super-linter/super-linter:v5` comes with all supported linters. -Example usage: +Example: -```yml -################################ -# Run Linter against code base # -################################ -- name: Lint Code Base - uses: super-linter/super-linter@v5 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +```markdown +[![Super-Linter](https://github.com///actions/workflows//badge.svg)](https://github.com/marketplace/actions/super-linter) ``` -#### Slim Image +For more information, see +[Adding a workflow status badge](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge). -The slim `super-linter/super-linter:slim-v5` comes with all supported linters but removes the following: +## Super-linter variants -- `rust` linters -- `dotenv` linters -- `armttk` linters -- `pwsh` linters -- `c#` linters +Super-Linter provides several variants: -By removing these linters, we were able to bring the image size down by `2gb` and drastically speed up the build and download time. -The behavior will be the same for non-supported languages, and will skip languages at runtime. -Example usage: +- `standard`: `super-linter/super-linter:[VERSION]`: includes all supported linters. +- `slim`: `super-linter/super-linter:slim-[VERSION]`: includes all supported linters except: -```yml -################################ -# Run Linter against code base # -################################ -- name: Lint Code Base - uses: super-linter/super-linter/slim@v5 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -``` - -## Environment variables - -The super-linter allows you to pass the following `ENV` variables to be able to trigger different functionality. + - `rust` linters + - `dotenv` linters + - `armttk` linters + - `pwsh` linters + - `c#` linters -_Note:_ All the `VALIDATE_[LANGUAGE]` variables behave in a very specific way: +## Configure super-linter -- If none of them are passed, then they all default to true. -- If any one of the variables are set to true, we default to leaving any unset variable to false (only validate those languages). -- If any one of the variables are set to false, we default to leaving any unset variable to true (only exclude those languages). -- If there are `VALIDATE_[LANGUAGE]` variables set to both true and false. It will fail. +You can configure super-linter using the following environment variables: -This means that if you run the linter "out of the box", all languages will be checked. -But if you wish to select or exclude specific linters, we give you full control to choose which linters are run, and won't run anything unexpected. - -| **ENV VAR** | **Default Value** | **Notes** | +| **Environment variable** | **Default Value** | **Description** | |-------------------------------------------------|---------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **ACTIONS_RUNNER_DEBUG** | `false` | Flag to enable additional information about the linter, versions, and additional output. | | **ANSIBLE_CONFIG_FILE** | `.ansible-lint.yml` | Filename for [Ansible-lint configuration](https://ansible.readthedocs.io/projects/lint/configuring/) (ex: `.ansible-lint`, `.ansible-lint.yml`) | @@ -285,6 +161,7 @@ But if you wish to select or exclude specific linters, we give you full control | **DISABLE_ERRORS** | `false` | Flag to have the linter complete with exit code 0 even if errors were detected. | | **DOCKERFILE_HADOLINT_FILE_NAME** | `.hadolint.yaml` | Filename for [hadolint configuration](https://github.com/hadolint/hadolint) (ex: `.hadolintlintrc.yaml`) | | **EDITORCONFIG_FILE_NAME** | `.ecrc` | Filename for [editorconfig-checker configuration](https://github.com/editorconfig-checker/editorconfig-checker) | +| **ENABLE_GITHUB_ACTIONS_GROUP_TITLE** | `false` if `RUN_LOCAL=true`, `true` otherwise | Flag to enable [GitHub Actions log grouping](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines). | | **ERROR_ON_MISSING_EXEC_BIT** | `false` | If set to `false`, the `bash-exec` linter will report a warning if a shell script is not executable. If set to `true`, the `bash-exec` linter will report an error instead. | | **EXPERIMENTAL_BATCH_WORKER** | `false` | Flag to enable experimental parallel and batched worker. As of current only `eslint` and `cfn-lint` are supported, if there is no support, original version is used as fallback | | **FILTER_REGEX_EXCLUDE** | `none` | Regular expression defining which files will be excluded from linting (ex: `.*src/test.*`) | @@ -310,7 +187,7 @@ But if you wish to select or exclude specific linters, we give you full control | **NATURAL_LANGUAGE_CONFIG_FILE** | `.textlintrc` | Filename for [textlint configuration](https://textlint.github.io/docs/getting-started.html#configuration) (ex: `.textlintrc`) | | **PERL_PERLCRITIC_OPTIONS** | `null` | Additional arguments to pass to the command-line when running **perlcritic** (Example: --theme community) | | **PHP_CONFIG_FILE** | `php.ini` | Filename for [PHP Configuration](https://www.php.net/manual/en/configuration.file.php) (ex: `php.ini`) | -| **PHP_PHPCS_FILE_NAME** | `phpcs.xml` | Filename for [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (ex: `.phpcs.xml`, `.phpcs.xml.dist`) | +| **PHP_PHPCS_FILE_NAME** | `phpcs.xml` | Filename for [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (ex: `.phpcs.xml`, `.phpcs.xml.dist`) | | **PROTOBUF_CONFIG_FILE** | `.protolintrc.yml` | Filename for [protolint configuration](https://github.com/yoheimuta/protolint/blob/master/_example/config/.protolint.yaml) (ex: `.protolintrc.yml`) | | **PYTHON_BLACK_CONFIG_FILE** | `.python-black` | Filename for [black configuration](https://github.com/psf/black/blob/main/docs/guides/using_black_with_other_tools.md#black-compatible-configurations) (ex: `.isort.cfg`, `pyproject.toml`) | | **PYTHON_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) | @@ -415,167 +292,120 @@ But if you wish to select or exclude specific linters, we give you full control | **YAML_CONFIG_FILE** | `.yaml-lint.yml` | Filename for [Yamllint configuration](https://yamllint.readthedocs.io/en/stable/configuration.html) (ex: `.yaml-lint.yml`, `.yamllint.yml`) | | **YAML_ERROR_ON_WARNING** | `false` | Flag to enable or disable the error on warning for Yamllint. | -### Template rules files - -You can use the **GitHub** **Super-Linter** _with_ or _without_ your own personal rules sets. This allows for greater flexibility for each individual codebase. The Template rules all try to follow the standards we believe should be enabled at the basic level. - -- Copy **any** or **all** template rules files from `TEMPLATES/` into the `.github/linters/` directory of your repository, and modify them to suit your needs. - - The rules files in [this repository's `TEMPLATE` folder](https://github.com/super-linter/super-linter/tree/main/TEMPLATES) will be used as defaults should any be omitted. - -### Using your own rules files - -If your repository contains your own rules files that live outside of a `.github/linters/` directory, you will have to tell Super-Linter where your rules files are located in your repository, and what their filenames are. To learn more, see [Using your own rules files](docs/using-rules-files.md). - -### Disabling rules - -If you need to disable certain _rules_ and _functionality_, you can view [Disable Rules](https://github.com/super-linter/super-linter/blob/main/docs/disabling-linters.md) - -### Using your own SSH key - -If you need to add your own SSH key to the linter because of private dependencies, you can use the `SSH_KEY` environment -variable. The value of that environment variable should be an SSH private key that has access to your private -repositories. - -You should add this key as an [Encrypted Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets) -and access it with the `secrets` parameter. - -Example workflow: - -```yml ---- -################################# -################################# -## Super Linter GitHub Actions ## -################################# -################################# -name: Lint Code Base - -############################# -# Start the job on all push # -############################# -on: - push: - branches-ignore: [master, main] - # Remove the line above to run when pushing to master or main - pull_request: - branches: [master, main] - -############### -# Set the Job # -############### -jobs: - build: - # Name the Job - name: Lint Code Base - # Set the agent to run on - runs-on: ubuntu-latest - - ################## - # Load all steps # - ################## - steps: - ########################## - # Checkout the code base # - ########################## - - name: Checkout Code - uses: actions/checkout@v4 - with: - # Full git history is needed to get a proper list of changed files within `super-linter` - fetch-depth: 0 - - ################################ - # Run Linter against code base # - ################################ - - name: Lint Code Base - uses: super-linter/super-linter@v5 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} +The `VALIDATE_[LANGUAGE]` variables work as follows: + +- super-linter runs all supported linters by default. +- If you set any of the `VALIDATE_[LANGUAGE]` variables to `true`, super-linter defaults to leaving any unset variable to false (only validate those languages). +- If you set any of the `VALIDATE_[LANGUAGE]` variables to `false`, super-linter defaults to leaving any unset variable to true (only exclude those languages). +- If you set any of the `VALIDATE_[LANGUAGE]` variables to both `true` and `false`, super-linter fails reporting an error. + +For more information about reusing super-linter configuration across +environments, see +[Share Environment variables between environments](docs/run-linter-locally.md#share-environment-variables-between-environments). + +## Configure linters + +Super-linter provides default configurations for some linters in the [`TEMPLATES/`](TEMPLATES/) +directory. You can customize the configuration for the linters that support +this by placing your own configuration files in the `LINTER_RULES_PATH` +directory. `LINTER_RULES_PATH` is relative to the `DEFAULT_WORKSPACE` directory. + +Super-linter supports customizing the name of these configuration files. For +more information, refer to [Configure super-linter](#configure-super-linter). + +For example, you can configure super-linter to load configuration files from the +`config/lint` directory in your repository: + +```yaml + env: + LINTER_RULES_PATH: `config/lint` ``` -## Filter linted files +Some of the linters that super-linter provides can be configured to disable +certain rules or checks, and to ignore certain files or part of them. + +For more information about how to configure each linter, review +[their own documentation](#supported-linters-and-code-analyzers). + +## Include or exclude files from checks -If you need to lint only a folder or exclude some files from linting, you can use optional environment parameters `FILTER_REGEX_INCLUDE` and `FILTER_REGEX_EXCLUDE` +If you need to include or exclude directories from being checked, you can use +two environment variables: `FILTER_REGEX_INCLUDE` and `FILTER_REGEX_EXCLUDE`. -Examples: +For example: -- Lint only src folder: `FILTER_REGEX_INCLUDE: .*src/.*` +- Lint only the `src` folder: `FILTER_REGEX_INCLUDE: .*src/.*` - Do not lint files inside test folder: `FILTER_REGEX_EXCLUDE: .*test/.*` - Do not lint JavaScript files inside test folder: `FILTER_REGEX_EXCLUDE: .*test/.*.js` -Additionally when `IGNORE_GENERATED_FILES=true`, super-linter -ignores any file with `@generated` marker in it unless the file -also has `@not-generated` marker. `@generated` marker is -[used by Facebook](https://engineering.fb.com/2015/08/20/open-source/writing-code-that-writes-code-with-hack-codegen/) -and some other projects to mark generated files. For example, this -file is considered generated: +Additionally, if you set `IGNORE_GENERATED_FILES` to `true`, super-linter +ignores any file with `@generated` string in it, unless the file +also has `@not-generated` marker. For example, super-linter considers a file +with the following contents as generated: ```bash #!/bin/sh echo "@generated" ``` -And this file is considered not generated: +while considers this file as not generated: ```bash #!/bin/sh echo "@generated" # @not-generated ``` -## Run Super-Linter outside GitHub Actions - -### Local (troubleshooting/debugging/enhancements) +Finally, you can set `IGNORE_GITIGNORED_FILES` to `true` to ignore a file if Git +ignores it too. -If you find that you need to run super-linter locally, you can follow the documentation at [Running super-linter locally](https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md) +## Run Super-Linter outside GitHub Actions -Check out the [note](#how-it-works) in **How it Works** to understand more about the **Super-Linter** linting locally versus via continuous integration. +You don't need GitHub Actions to run super-linter. It supports several runtime +environments. -### Azure +### Run using a container runtime engine -Check out this [article](https://blog.tyang.org/2020/06/27/use-github-super-linter-in-azure-pipelines/) +You can run super-linter outside GitHub Actions. For example, you can run +super-linter from a shell: -### GitLab +```bash +docker run \ + -e ACTIONS_RUNNER_DEBUG=true \ + -e RUN_LOCAL=true \ + -v /path/to/local/codebase:/tmp/lint \ + ghcr.io/super-linter/super-linter:latest +``` -Check out this [snippet](https://gitlab.com/snippets/1988376) and this Guided Exploration: [GitLab CI CD Extension for Super-Linter](https://gitlab.com/guided-explorations/ci-cd-plugin-extensions/ci-cd-plugin-extension-github-action-super-linter) +For more information, see +[Run super-linter outside GitHub Actions](https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md). -### Codespaces and Visual Studio Code +## Use your own SSH key and certificate -You can checkout this repository using [GitHub Codespaces](https://github.com/features/codespaces/) and [Container Remote Development](https://code.visualstudio.com/docs/remote/containers), and debug the linter using the `Test Linter` task. -![Example](https://user-images.githubusercontent.com/15258962/85165778-2d2ce700-b21b-11ea-803e-3f6709d8e609.gif) +If you need to use your own SSH key to authenticate against private +repositories, you can use the `SSH_KEY` environment variable. The value of that +environment variable is expected to be be the private key of an SSH keypair that +has access to your private repositories. -### SSL Certs +For example, you can configure this private key as an +[Encrypted Secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets) +and access it with the `secrets` parameter from your GitHub Actions workflow: -If you need to inject a SSL cert into the trust store, you will need to first copy the cert to **GitHub Secrets** -Once you have copied the plain text certificate into **GitHub Secrets**, you can use the variable `SSL_CERT_SECRET` to point the **Super-Linter** to the files contents. -Once found, it will load the certificate contents to a file, and to the trust store. +```yaml + env: + SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} +``` -- Example workflow: +If you need to inject a SSL certificate into the trust store, you can use the +`SSL_CERT_SECRET` variable. The value of that variable is expected to be the +path to the files that contains a CA that can be used to valide the certificate: -```yml -- name: Lint Code Base - uses: super-linter/super-linter@v5 +```yaml env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SSL_CERT_SECRET: ${{ secrets.ROOT_CA }} ``` -## Limitations - -Below are a list of the known limitations for the **GitHub Super-Linter**: - -- Due to being completely packaged at runtime, you will not be able to update dependencies or change versions of the enclosed linters and binaries -- Additional details from `package.json` are not read by the **GitHub Super-Linter** -- Downloading additional codebases as dependencies from private repositories will fail due to lack of permissions - ## How to contribute -If you would like to help contribute to this **GitHub** Action, please see [CONTRIBUTING](https://github.com/super-linter/super-linter/blob/main/.github/CONTRIBUTING.md) - ---- - -### License - -- [MIT License](https://github.com/super-linter/super-linter/blob/main/LICENSE) +If you would like to help contribute to super-linter, see +[CONTRIBUTING](https://github.com/super-linter/super-linter/blob/main/.github/CONTRIBUTING.md). diff --git a/SECURITY.md b/SECURITY.md index a9e9052f13a..94633d22dd7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,5 +1,17 @@ -# Security Policy +# Reporting Security Issues -If you discover a security issue in this repository, please submit it through the [GitHub Security Bug Bounty](https://hackerone.com/github) +The super-linter team and community take security bugs seriously. We appreciate +your efforts to responsibly disclose your findings, and will make every effort +to acknowledge your contributions. -Thanks for helping make GitHub Actions safe for everyone. +To report a security issue, please use the GitHub Security Advisory +["Report a Vulnerability"](https://github.com/super-linter/super-linter/security/advisories/new) +feature. + +The super-linter team will send a response indicating the next steps in handling +your report. After the initial reply to your report, the security team will keep +you informed of the progress towards a fix and full announcement, and may ask +for additional information or guidance. + +Report security bugs in third-party software to the person or team maintaining +the third-party software. diff --git a/TEMPLATES/.sqlfluff b/TEMPLATES/.sqlfluff index 27216cf8c34..125435274ab 100644 --- a/TEMPLATES/.sqlfluff +++ b/TEMPLATES/.sqlfluff @@ -1,8 +1,8 @@ ## This /.sqlfluff file can be used to configure the SQLFluff linter when -## used via the GitHub Super Linter. Copy it to the .github/linters folder of +## used via the Super Linter. Copy it to the .github/linters folder of ## your repo, and uncomment the necessary lines to configure the Super Linter. ## -## IMPORTANT NOTE: The GitHub Super Linter configuration file for SQLFluff +## IMPORTANT NOTE: The Super Linter configuration file for SQLFluff ## supersedes any local configuration files you might have in within your ## codebase. For this reason it should only be used when you want the same ## configuration for your entire code base. If you need different configuration diff --git a/TEMPLATES/linter.yml b/TEMPLATES/linter.yml deleted file mode 100644 index f6281ed9849..00000000000 --- a/TEMPLATES/linter.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -################################# -################################# -## Super Linter GitHub Actions ## -################################# -################################# -name: Lint Code Base - -# -# Documentation: -# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions -# - -############################# -# Start the job on all push # -############################# -on: - push: - branches-ignore: [master, main] - # Remove the line above to run when pushing to master - pull_request: - branches: [master, main] - -############### -# Set the Job # -############### -jobs: - build: - # Name the Job - name: Lint Code Base - # Set the agent to run on - runs-on: ubuntu-latest - - ############################################ - # Grant status permission for MULTI_STATUS # - ############################################ - permissions: - contents: read - packages: read - statuses: write - - ################## - # Load all steps # - ################## - steps: - ########################## - # Checkout the code base # - ########################## - - name: Checkout Code - uses: actions/checkout@v3 - with: - # Full git history is needed to get a proper - # list of changed files within `super-linter` - fetch-depth: 0 - - ################################ - # Run Linter against code base # - ################################ - - name: Lint Code Base - uses: super-linter/super-linter@v5 - env: - VALIDATE_ALL_CODEBASE: false - # Change to 'master' if your main branch differs - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/TEMPLATES/phpcs.xml b/TEMPLATES/phpcs.xml index db39fed5eb8..27cefdd2cc2 100644 --- a/TEMPLATES/phpcs.xml +++ b/TEMPLATES/phpcs.xml @@ -1,6 +1,6 @@ - The default coding standard for usage with GitHub Super-Linter. It just includes PSR12. + The default coding standard for usage with Super-Linter. It just includes PSR12. diff --git a/dependencies/checkstyle/build.gradle b/dependencies/checkstyle/build.gradle index d8c23db641c..438c79228f5 100644 --- a/dependencies/checkstyle/build.gradle +++ b/dependencies/checkstyle/build.gradle @@ -5,7 +5,7 @@ repositories { // Hold this dependency here so we can get automated updates using DependaBot dependencies { - implementation 'com.puppycrawl.tools:checkstyle:10.12.5' + implementation 'com.puppycrawl.tools:checkstyle:10.12.6' } group 'com.github.super-linter' diff --git a/dependencies/package-lock.json b/dependencies/package-lock.json index b1d3256b031..ccb6bf84f6c 100644 --- a/dependencies/package-lock.json +++ b/dependencies/package-lock.json @@ -36,20 +36,20 @@ "jscpd": "^3.5.10", "lodash": "^4.17.21", "markdownlint-cli": "^0.37.0", - "next": "^14.0.3", + "next": "^14.0.4", "next-pwa": "^5.6.0", "node-fetch": "^3.3.2", - "npm-groovy-lint": "^13.0.0", + "npm-groovy-lint": "^13.0.2", "postcss-less": "^6.0.0", - "prettier": "^3.0.3", + "prettier": "^3.1.1", "prettyjson": "^1.2.5", "pug": "^3.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-intl": "^6.5.5", - "react-redux": "^9.0.1", + "react-redux": "^9.0.3", "react-router-dom": "^6.20.1", - "renovate": "^37.83.5", + "renovate": "^37.89.7", "sql-lint": "1.0.0", "standard": "^17.1.0", "stylelint": "^15.11.0", @@ -58,14 +58,14 @@ "stylelint-config-standard": "^34.0.0", "stylelint-config-standard-scss": "^11.1.0", "stylelint-prettier": "^4.1.0", - "stylelint-scss": "^5.3.1", + "stylelint-scss": "^5.3.2", "tekton-lint": "^0.6.0", "textlint": "^13.4.1", "textlint-filter-rule-allowlist": "^4.0.0", "textlint-filter-rule-comments": "^1.2.2", "textlint-rule-terminology": "^4.0.1", "ts-standard": "^12.0.2", - "typescript": "^5.3.2" + "typescript": "^5.3.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -3142,25 +3142,25 @@ } }, "node_modules/@breejs/later": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@breejs/later/-/later-4.1.0.tgz", - "integrity": "sha512-QgGnZ9b7o4k0Ai1ZbTJWwZpZcFK9d+Gb+DyNt4UT9x6IEIs5HVu0iIlmgzGqN+t9MoJSpSPo9S/Mm51UtHr3JA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@breejs/later/-/later-4.2.0.tgz", + "integrity": "sha512-EVMD0SgJtOuFeg0lAVbCwa+qeTKILb87jqvLyUtQswGD9+ce2nB52Y5zbTF1Hc0MDFfbydcMcxb47jSdhikVHA==", "engines": { "node": ">= 10" } }, "node_modules/@cdktf/hcl2json": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@cdktf/hcl2json/-/hcl2json-0.19.1.tgz", - "integrity": "sha512-yQ5fTOK9aLuh3WsYV+ykqv0b1X+5KjqAgxaAU+f9pXNq3ght1Z6o7+jrBsPHpylcj318Bhl0Hc/PX3U/z6M2kg==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@cdktf/hcl2json/-/hcl2json-0.19.2.tgz", + "integrity": "sha512-gFj36AshWSyPKq/eNjQtMnWj0QM0tPtMulFpQ0FrB+eWj0GvxgWg9d65gGCZ8Y/o33VV/2Kv5l8VlDEYDW2S7Q==", "dependencies": { "fs-extra": "^11.1.1" } }, "node_modules/@cdktf/hcl2json/node_modules/fs-extra": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", - "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -3731,14 +3731,14 @@ "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" }, "node_modules/@next/env": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.0.3.tgz", - "integrity": "sha512-7xRqh9nMvP5xrW4/+L0jgRRX+HoNRGnfJpD+5Wq6/13j3dsdzxO3BCXn7D3hMqsDb+vjZnJq+vI7+EtgrYZTeA==" + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.0.4.tgz", + "integrity": "sha512-irQnbMLbUNQpP1wcE5NstJtbuA/69kRfzBrpAD7Gsn8zm/CY6YQYc3HQBz8QPxwISG26tIm5afvvVbu508oBeQ==" }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.3.tgz", - "integrity": "sha512-64JbSvi3nbbcEtyitNn2LEDS/hcleAFpHdykpcnrstITFlzFgB/bW0ER5/SJJwUPj+ZPY+z3e+1jAfcczRLVGw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.4.tgz", + "integrity": "sha512-mF05E/5uPthWzyYDyptcwHptucf/jj09i2SXBPwNzbgBNc+XnwzrL0U6BmPjQeOL+FiB+iG1gwBeq7mlDjSRPg==", "cpu": [ "arm64" ], @@ -3751,9 +3751,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.3.tgz", - "integrity": "sha512-RkTf+KbAD0SgYdVn1XzqE/+sIxYGB7NLMZRn9I4Z24afrhUpVJx6L8hsRnIwxz3ERE2NFURNliPjJ2QNfnWicQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.4.tgz", + "integrity": "sha512-IZQ3C7Bx0k2rYtrZZxKKiusMTM9WWcK5ajyhOZkYYTCc8xytmwSzR1skU7qLgVT/EY9xtXDG0WhY6fyujnI3rw==", "cpu": [ "x64" ], @@ -3766,9 +3766,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.3.tgz", - "integrity": "sha512-3tBWGgz7M9RKLO6sPWC6c4pAw4geujSwQ7q7Si4d6bo0l6cLs4tmO+lnSwFp1Tm3lxwfMk0SgkJT7EdwYSJvcg==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.4.tgz", + "integrity": "sha512-VwwZKrBQo/MGb1VOrxJ6LrKvbpo7UbROuyMRvQKTFKhNaXjUmKTu7wxVkIuCARAfiI8JpaWAnKR+D6tzpCcM4w==", "cpu": [ "arm64" ], @@ -3781,9 +3781,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.3.tgz", - "integrity": "sha512-v0v8Kb8j8T23jvVUWZeA2D8+izWspeyeDGNaT2/mTHWp7+37fiNfL8bmBWiOmeumXkacM/AB0XOUQvEbncSnHA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.4.tgz", + "integrity": "sha512-8QftwPEW37XxXoAwsn+nXlodKWHfpMaSvt81W43Wh8dv0gkheD+30ezWMcFGHLI71KiWmHK5PSQbTQGUiidvLQ==", "cpu": [ "arm64" ], @@ -3796,9 +3796,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.3.tgz", - "integrity": "sha512-VM1aE1tJKLBwMGtyBR21yy+STfl0MapMQnNrXkxeyLs0GFv/kZqXS5Jw/TQ3TSUnbv0QPDf/X8sDXuMtSgG6eg==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.4.tgz", + "integrity": "sha512-/s/Pme3VKfZAfISlYVq2hzFS8AcAIOTnoKupc/j4WlvF6GQ0VouS2Q2KEgPuO1eMBwakWPB1aYFIA4VNVh667A==", "cpu": [ "x64" ], @@ -3811,9 +3811,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.3.tgz", - "integrity": "sha512-64EnmKy18MYFL5CzLaSuUn561hbO1Gk16jM/KHznYP3iCIfF9e3yULtHaMy0D8zbHfxset9LTOv6cuYKJgcOxg==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.4.tgz", + "integrity": "sha512-m8z/6Fyal4L9Bnlxde5g2Mfa1Z7dasMQyhEhskDATpqr+Y0mjOBZcXQ7G5U+vgL22cI4T7MfvgtrM2jdopqWaw==", "cpu": [ "x64" ], @@ -3826,9 +3826,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.3.tgz", - "integrity": "sha512-WRDp8QrmsL1bbGtsh5GqQ/KWulmrnMBgbnb+59qNTW1kVi1nG/2ndZLkcbs2GX7NpFLlToLRMWSQXmPzQm4tog==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.4.tgz", + "integrity": "sha512-7Wv4PRiWIAWbm5XrGz3D8HUkCVDMMz9igffZG4NB1p4u1KoItwx9qjATHz88kwCEal/HXmbShucaslXCQXUM5w==", "cpu": [ "arm64" ], @@ -3841,9 +3841,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.3.tgz", - "integrity": "sha512-EKffQeqCrj+t6qFFhIFTRoqb2QwX1mU7iTOvMyLbYw3QtqTw9sMwjykyiMlZlrfm2a4fA84+/aeW+PMg1MjuTg==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.4.tgz", + "integrity": "sha512-zLeNEAPULsl0phfGb4kdzF/cAVIfaC7hY+kt0/d+y9mzcZHsMS3hAS829WbJ31DkSlVKQeHEjZHIdhN+Pg7Gyg==", "cpu": [ "ia32" ], @@ -3856,9 +3856,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.3.tgz", - "integrity": "sha512-ERhKPSJ1vQrPiwrs15Pjz/rvDHZmkmvbf/BjPN/UCOI++ODftT0GtasDPi0j+y6PPJi5HsXw+dpRaXUaw4vjuQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.4.tgz", + "integrity": "sha512-yEh2+R8qDlDCjxVpzOTEpBLQTEFAcP2A8fUFLaWNap9GitYKkKv1//y2S6XY6zsR4rCOPRpU7plYDR+az2n30A==", "cpu": [ "x64" ], @@ -10015,18 +10015,18 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" }, "node_modules/emojibase": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/emojibase/-/emojibase-15.2.0.tgz", - "integrity": "sha512-gB6rIVtyJPersQvAo4nOGYPeILMhlcfZdiwCWVeRAtkJ7sm0tExZETGyLhrTQcHvZQhDEYI1vlCeqUhn5gZkQA==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/emojibase/-/emojibase-15.3.0.tgz", + "integrity": "sha512-lFdQb14hoznwDh1xDoOFzkPdeeexmbuJdhUUjDaJZf/+jK+6Z3HkI5hWOemWfEdaMxtTujc1vNRx9DKtdtiOXA==", "funding": { "type": "ko-fi", "url": "https://ko-fi.com/milesjohnson" } }, "node_modules/emojibase-regex": { - "version": "15.2.0", - "resolved": "https://registry.npmjs.org/emojibase-regex/-/emojibase-regex-15.2.0.tgz", - "integrity": "sha512-65H5YepRW3gdrghV/Ed9kW3Qry8/qeKJmMlm31nTsOrEZfuAgyr28FmloXpyak86+chR8cukZA7dlafZzrJXbw==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/emojibase-regex/-/emojibase-regex-15.3.0.tgz", + "integrity": "sha512-EBz/292VBF9naBPBsGzkZUccgIv1xJibTXIINl8SezgVRnTCpKJx7MgZcR+UAd2RwjGkRJJZ/lhP7riOFZLicA==", "funding": { "type": "ko-fi", "url": "https://ko-fi.com/milesjohnson" @@ -11791,9 +11791,9 @@ } }, "node_modules/gcp-metadata": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.0.0.tgz", - "integrity": "sha512-Ozxyi23/1Ar51wjUT2RDklK+3HxqDr8TLBNK8rBBFQ7T85iIGnXnVusauj06QyqCXRFZig8LZC+TUddWbndlpQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz", + "integrity": "sha512-Jh/AIwwgaxan+7ZUUmRLCjtchyDiqh4KjBJ5tW3plBZb5iL/BPcso8A5DlzeD9qlw0duCamnNdpFjxwaT0KyKg==", "dependencies": { "gaxios": "^6.0.0", "json-bigint": "^1.0.0" @@ -12488,14 +12488,14 @@ } }, "node_modules/google-auth-library": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.2.0.tgz", - "integrity": "sha512-1oV3p0JhNEhVbj26eF3FAJcv9MXXQt4S0wcvKZaDbl4oHq5V3UJoSbsGZGQNcjoCdhW4kDSwOs11wLlHog3fgQ==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.4.1.tgz", + "integrity": "sha512-Chs7cuzDuav8W/BXOoRgSXw4u0zxYtuqAHETDR5Q6dG1RwNwz7NUKjsDDHAsBV3KkiiJBtJqjbzy1XU1L41w1g==", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^6.0.0", - "gcp-metadata": "^6.0.0", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", "gtoken": "^7.0.0", "jws": "^4.0.0" }, @@ -12539,9 +12539,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graph-data-structure": { "version": "3.3.0", @@ -15274,14 +15274,15 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/next": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/next/-/next-14.0.3.tgz", - "integrity": "sha512-AbYdRNfImBr3XGtvnwOxq8ekVCwbFTv/UJoLwmaX89nk9i051AEY4/HAWzU0YpaTDw8IofUpmuIlvzWF13jxIw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/next/-/next-14.0.4.tgz", + "integrity": "sha512-qbwypnM7327SadwFtxXnQdGiKpkuhaRLE2uq62/nRul9cj9KhQ5LhHmlziTNqUidZotw/Q1I9OjirBROdUJNgA==", "dependencies": { - "@next/env": "14.0.3", + "@next/env": "14.0.4", "@swc/helpers": "0.5.2", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", + "graceful-fs": "^4.2.11", "postcss": "8.4.31", "styled-jsx": "5.1.1", "watchpack": "2.4.0" @@ -15293,15 +15294,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.0.3", - "@next/swc-darwin-x64": "14.0.3", - "@next/swc-linux-arm64-gnu": "14.0.3", - "@next/swc-linux-arm64-musl": "14.0.3", - "@next/swc-linux-x64-gnu": "14.0.3", - "@next/swc-linux-x64-musl": "14.0.3", - "@next/swc-win32-arm64-msvc": "14.0.3", - "@next/swc-win32-ia32-msvc": "14.0.3", - "@next/swc-win32-x64-msvc": "14.0.3" + "@next/swc-darwin-arm64": "14.0.4", + "@next/swc-darwin-x64": "14.0.4", + "@next/swc-linux-arm64-gnu": "14.0.4", + "@next/swc-linux-arm64-musl": "14.0.4", + "@next/swc-linux-x64-gnu": "14.0.4", + "@next/swc-linux-x64-musl": "14.0.4", + "@next/swc-win32-arm64-msvc": "14.0.4", + "@next/swc-win32-ia32-msvc": "14.0.4", + "@next/swc-win32-x64-msvc": "14.0.4" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -15620,9 +15621,9 @@ } }, "node_modules/npm-groovy-lint": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-13.0.0.tgz", - "integrity": "sha512-8+WAJxj0gmx07uXEDiRgSY9sBMOnCqfi/d1zqmIl8V6Q6xg/RR8QoZKbMZAQ+MR52k0GpTeakDJqYERaa/jxnw==", + "version": "13.0.2", + "resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-13.0.2.tgz", + "integrity": "sha512-tVMsJ/c34fl0JD0nxJTqv2j5qceZaxq/+NuF6fNvFAncVLH4QkquFSF0TpKeY8X9hlltnowcrtxv82oo3sdeBQ==", "dependencies": { "amplitude": "^5.1.6", "ansi-colors": "^4.1.1", @@ -16670,9 +16671,9 @@ } }, "node_modules/prettier": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", - "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -17083,31 +17084,23 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-redux": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.0.1.tgz", - "integrity": "sha512-d+S89OqyChnY2J0O8wv8boRgnGo0tjvxkMLV78wx7h2ZyJvyeOQcBg4yrm7IxY36gxc63iOCfjjQAyhohKWJbA==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.0.3.tgz", + "integrity": "sha512-bilZStJN00qYqAXBpu/taUXv0tcuOrhBFD86fSERgYUm0+IHi/OQnqopbNalhgSo7+KMjSW5H/UTrWasXDvtug==", "dependencies": { "@types/use-sync-external-store": "^0.0.3", "use-sync-external-store": "^1.0.0" }, "peerDependencies": { - "@types/react": "^18.2.41", - "@types/react-dom": "^18.2.17", + "@types/react": "^18.2.25", "react": "^18.0", - "react-dom": "^18.0", - "react-native": ">=0.71", + "react-native": "^0.69.0", "redux": "^5.0.0" }, "peerDependenciesMeta": { "@types/react": { "optional": true }, - "@types/react-dom": { - "optional": true - }, - "react-dom": { - "optional": true - }, "react-native": { "optional": true }, @@ -17565,9 +17558,9 @@ } }, "node_modules/renovate": { - "version": "37.83.5", - "resolved": "https://registry.npmjs.org/renovate/-/renovate-37.83.5.tgz", - "integrity": "sha512-4I9JRSYFSYMOZVVHBJKJ2TZkniZLM/PzgRdbtOIqAvKfEonjh2a89COLdM8TYcLH0laTmL6b8MZOdJBBpOWJug==", + "version": "37.89.7", + "resolved": "https://registry.npmjs.org/renovate/-/renovate-37.89.7.tgz", + "integrity": "sha512-3x9ELfms39Ps/95We9etkhGcIeMlP510kEFc/JiBD+JBg7FGk3M7tvUqOstjI/jvuqtnM6t3QplOM87cHYLQeA==", "dependencies": { "@aws-sdk/client-codecommit": "3.363.0", "@aws-sdk/client-ec2": "3.363.0", @@ -17575,8 +17568,8 @@ "@aws-sdk/client-rds": "3.363.0", "@aws-sdk/client-s3": "3.363.0", "@aws-sdk/credential-providers": "3.363.0", - "@breejs/later": "4.1.0", - "@cdktf/hcl2json": "0.19.1", + "@breejs/later": "4.2.0", + "@cdktf/hcl2json": "0.19.2", "@opentelemetry/api": "1.7.0", "@opentelemetry/context-async-hooks": "1.18.1", "@opentelemetry/exporter-trace-otlp-http": "0.45.1", @@ -17616,8 +17609,8 @@ "editorconfig": "2.0.0", "email-addresses": "5.0.0", "emoji-regex": "10.3.0", - "emojibase": "15.2.0", - "emojibase-regex": "15.2.0", + "emojibase": "15.3.0", + "emojibase-regex": "15.3.0", "extract-zip": "2.0.1", "find-packages": "10.0.4", "find-up": "5.0.0", @@ -17627,7 +17620,7 @@ "glob": "10.3.10", "global-agent": "3.0.0", "good-enough-parser": "1.1.23", - "google-auth-library": "9.2.0", + "google-auth-library": "9.4.1", "got": "11.8.6", "graph-data-structure": "3.3.0", "handlebars": "4.7.8", @@ -17654,7 +17647,7 @@ "p-queue": "6.6.2", "p-throttle": "4.1.1", "parse-link-header": "2.0.0", - "prettier": "3.1.0", + "prettier": "3.1.1", "redis": "4.6.11", "remark": "13.0.0", "remark-github": "10.1.0", @@ -17880,6 +17873,20 @@ "node": ">=8" } }, + "node_modules/renovate/node_modules/prettier": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/renovate/node_modules/safe-stable-stringify": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", @@ -19317,9 +19324,9 @@ } }, "node_modules/stylelint-scss": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.3.1.tgz", - "integrity": "sha512-5I9ZDIm77BZrjOccma5WyW2nJEKjXDd4Ca8Kk+oBapSO4pewSlno3n+OyimcyVJJujQZkBN2D+xuMkIamSc6hA==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.3.2.tgz", + "integrity": "sha512-4LzLaayFhFyneJwLo0IUa8knuIvj+zF0vBFueQs4e3tEaAMIQX8q5th8ziKkgOavr6y/y9yoBe+RXN/edwLzsQ==", "dependencies": { "known-css-properties": "^0.29.0", "postcss-media-query-parser": "^0.2.3", @@ -20487,9 +20494,9 @@ } }, "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/dependencies/package.json b/dependencies/package.json index 1caf83ed24b..30c572b8a74 100644 --- a/dependencies/package.json +++ b/dependencies/package.json @@ -31,20 +31,20 @@ "jscpd": "^3.5.10", "lodash": "^4.17.21", "markdownlint-cli": "^0.37.0", - "next": "^14.0.3", + "next": "^14.0.4", "next-pwa": "^5.6.0", "node-fetch": "^3.3.2", - "npm-groovy-lint": "^13.0.0", + "npm-groovy-lint": "^13.0.2", "postcss-less": "^6.0.0", - "prettier": "^3.0.3", + "prettier": "^3.1.1", "prettyjson": "^1.2.5", "pug": "^3.0.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-intl": "^6.5.5", - "react-redux": "^9.0.1", + "react-redux": "^9.0.3", "react-router-dom": "^6.20.1", - "renovate": "^37.83.5", + "renovate": "^37.89.7", "sql-lint": "1.0.0", "standard": "^17.1.0", "stylelint": "^15.11.0", @@ -53,13 +53,13 @@ "stylelint-config-standard": "^34.0.0", "stylelint-config-standard-scss": "^11.1.0", "stylelint-prettier": "^4.1.0", - "stylelint-scss": "^5.3.1", + "stylelint-scss": "^5.3.2", "tekton-lint": "^0.6.0", "textlint": "^13.4.1", "textlint-filter-rule-allowlist": "^4.0.0", "textlint-filter-rule-comments": "^1.2.2", "textlint-rule-terminology": "^4.0.1", "ts-standard": "^12.0.2", - "typescript": "^5.3.2" + "typescript": "^5.3.3" } } diff --git a/dependencies/python/cfn-lint.txt b/dependencies/python/cfn-lint.txt index 67b9f11b995..770fadc5564 100644 --- a/dependencies/python/cfn-lint.txt +++ b/dependencies/python/cfn-lint.txt @@ -1 +1 @@ -cfn-lint==0.83.3 +cfn-lint==0.83.4 diff --git a/dependencies/python/isort.txt b/dependencies/python/isort.txt index d3cda9c2500..0ef9fbe8a98 100644 --- a/dependencies/python/isort.txt +++ b/dependencies/python/isort.txt @@ -1 +1 @@ -isort==5.12.0 +isort==5.13.0 diff --git a/dependencies/python/pylint.txt b/dependencies/python/pylint.txt index c03470871d0..36dcc232fc3 100644 --- a/dependencies/python/pylint.txt +++ b/dependencies/python/pylint.txt @@ -1 +1 @@ -pylint==3.0.2 +pylint==3.0.3 diff --git a/docs/add-new-linter.md b/docs/add-new-linter.md new file mode 100644 index 00000000000..27e4cf68651 --- /dev/null +++ b/docs/add-new-linter.md @@ -0,0 +1,100 @@ +# How to add support for a new tool to super-linter + +If you want to propose a *Pull Request* to add **new** language support or a +new tool, it should include: + +- Update documentation: + - `README.md` +- Provide test cases: + + 1. Create the `.automation/test/` directory. + 2. Provide at least one test case with a file that is supposed to pass validation: `.automation/test//-good.ext` + 3. Provide at least one test case with a file that is supposed to fail validation: `.automation/test//-bad.ext` + +- Update the test suite to check for installed packages, the commands that your new tool needs in the `PATH`, and the expected version command: + + - `test/inspec/super-linter/controls/super_linter.rb` + +- Install the tool by pointing to specific package or container image versions: + + - If there are PyPi packages, create a text file named `dependencies/python/.txt` + and list the packages there. + - If there are npm packages, update `dependencies/package.json` and `dependencies/package-lock.json`. + by adding the new packages. + - If there are Ruby Gems, update `dependencies/Gemfile` and `dependencies/Gemfile.lock` + - If there are Maven or Java packages: + + 1. Create a directory named `dependencies/`. + 2. Create a `dependencies//build.gradle` file with the following contents: + + ```gradle + repositories { + mavenLocal() + mavenCentral() + } + + // Hold this dependency here so we can get automated updates using DependaBot + dependencies { + implementation 'your:dependency-here:version' + } + + group 'com.github.super-linter' + version '1.0.0-SNAPSHOT' + ``` + + 3. Update the `dependencies` section in `dependencies//build.gradle` to + install your dependencies. + 4. Add the following content to the `Dockerfile`: + + ```dockerfile + COPY scripts/install-.sh / + RUN --mount=type=secret,id=GITHUB_TOKEN /.sh && rm -rf /.sh + ``` + + 5. Create `scripts/install-.sh`, and implement the logic to install your tool. + You get the version of a dependency from `build.gradle`. Example: + + ```sh + GOOGLE_JAVA_FORMAT_VERSION="$(grep <"google-java-format/build.gradle" "google-java-format" | awk -F ':' '{print $3}' | tr -d "'")" + ``` + + 6. Add the new to DependaBot configuration: + + ```yaml + - package-ecosystem: "gradle" + directory: "/dependencies/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + ``` + + - If there is a container (Docker) image: + + 1. Add a new build stage to get the image: + + ```dockerfile + FROM your/image:version as + ``` + + 1. Copy the necessary binaries and libraries to the relevant locations. Example: + + ```sh + COPY --from= /usr/local/bin/ /usr/bin/ + ``` + +- Configure the new tool: + + - Provide a default configuration file only if the tool cannot function without one: `TEMPLATES/