diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 8af810e..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -version: 2.1 -orbs: - kitchen: sous-chefs/kitchen@2 -workflows: - danger: - jobs: - - kitchen/danger: - name: danger - context: Danger-Minimal diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd4a1e2..c5a19ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,10 +8,16 @@ name: ci jobs: lint-unit: - uses: sous-chefs/.github/.github/workflows/lint-unit.yml@0.0.3 + uses: sous-chefs/.github/.github/workflows/lint-unit.yml@2.0.6 + permissions: + actions: write + checks: write + pull-requests: write + statuses: write + issues: write integration: - needs: lint-unit + needs: "lint-unit" runs-on: ubuntu-latest strategy: matrix: @@ -32,11 +38,11 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 - name: Install Chef - uses: actionshub/chef-install@main + uses: actionshub/chef-install@2.0.4 - name: Dokken - uses: actionshub/test-kitchen@main + uses: actionshub/test-kitchen@2.1.0 env: CHEF_LICENSE: accept-no-persist KITCHEN_LOCAL_YAML: kitchen.dokken.yml diff --git a/.github/workflows/md-links.yml b/.github/workflows/md-links.yml index ba887a1..f30f4ab 100644 --- a/.github/workflows/md-links.yml +++ b/.github/workflows/md-links.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 - name: markdown-link-check uses: gaurav-nelson/github-action-markdown-link-check@v1 with: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 9e2ff38..4bb59c6 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -8,7 +8,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3 + - uses: actions/stale@v8 with: repo-token: ${{ secrets.GITHUB_TOKEN }} close-issue-message: > diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 0000000..6fa8e77 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,5 @@ +config: + ul-indent: false # MD007 + line-length: false # MD013 + no-duplicate-heading: false # MD024 + reference-links-images: false # MD052 diff --git a/.overcommit.yml b/.overcommit.yml index cd8682a..0e89a3c 100644 --- a/.overcommit.yml +++ b/.overcommit.yml @@ -4,13 +4,21 @@ PreCommit: enabled: true YamlLint: enabled: true - Rspec: + required_executable: "yamllint" + ChefSpec: enabled: true - required_executable: 'rspec' + required_executable: "chef" + command: ["chef", "exec", "rspec"] Cookstyle: enabled: true - required_executable: 'cookstyle' + required_executable: "cookstyle" command: ["cookstyle"] + MarkdownLint: + enabled: false + required_executable: "npx" + command: ["npx", "markdownlint-cli2", "'**/*.md'"] + include: ["**/*.md"] + CommitMsg: HardTabs: enabled: true diff --git a/.vscode/extensions.json b/.vscode/extensions.json index cd77725..51d0ae7 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,8 @@ { "recommendations": [ - "chef-software.chef", - "rebornix.ruby", - "editorconfig.editorconfig" + "chef-software.chef", + "rebornix.ruby", + "editorconfig.editorconfig", + "DavidAnson.vscode-markdownlint" ] } diff --git a/.yamllint b/.yamllint index 1b5cea0..0046b23 100644 --- a/.yamllint +++ b/.yamllint @@ -11,3 +11,5 @@ rules: max-spaces-inside: 1 min-spaces-inside-empty: -1 max-spaces-inside-empty: -1 + comments: + min-spaces-from-content: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 974061f..91b2e23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,18 @@ This file is used to list changes made in each version of the snort cookbook. - Update tested platforms - Enable unified_mode +## 5.0.8 - *2023-10-03* + +## 5.0.7 - *2023-09-29* + +## 5.0.6 - *2023-06-08* + +## 5.0.5 - *2023-06-08* + +Standardise files with files in sous-chefs/repo-management + +## 5.0.4 - *2023-02-14* + ## 5.0.3 - *2022-02-08* - Remove delivery folder @@ -64,7 +76,7 @@ This file is used to list changes made in each version of the snort cookbook. ## v2.0.0 -- Added new snort_service custom resource and a _service.rb recipe. The recipe is called by the default.rb recipe. The custom resource can be used to write wrapper cookbooks and supports the standard service actions (enable, start, restart, reload). The custom resource used the new Chef 12.5 customer resource format and the compat_resource cookbook for compatibility with 12.0+ +- Added new snort_service custom resource and a `_service.rb` recipe. The recipe is called by the default.rb recipe. The custom resource can be used to write wrapper cookbooks and supports the standard service actions (enable, start, restart, reload). The custom resource used the new Chef 12.5 customer resource format and the compat_resource cookbook for compatibility with 12.0+ ## v1.1.0 diff --git a/chefignore b/chefignore index cc170ea..a27b0b2 100644 --- a/chefignore +++ b/chefignore @@ -61,7 +61,7 @@ Dangerfile examples/* features/* Guardfile -kitchen.yml* +kitchen*.yml mlc_config.json Procfile Rakefile diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 16b534c..47eff95 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -1,13 +1,10 @@ ---- driver: name: dokken privileged: true + chef_version: <%= ENV['CHEF_VERSION'] || 'current' %> -transport: - name: dokken - -provisioner: - name: dokken +transport: { name: dokken } +provisioner: { name: dokken } platforms: - name: almalinux-8 @@ -15,11 +12,36 @@ platforms: image: dokken/almalinux-8 pid_one_command: /usr/lib/systemd/systemd - - name: amazonlinux-2 + - name: almalinux-9 + driver: + image: dokken/almalinux-9 + pid_one_command: /usr/lib/systemd/systemd + + - name: amazonlinux-2023 driver: - image: dokken/amazonlinux-2 + image: dokken/amazonlinux-2023 pid_one_command: /usr/lib/systemd/systemd + - name: centos-7 + driver: + image: dokken/centos-7 + pid_one_command: /usr/lib/systemd/systemd + + - name: centos-stream-8 + driver: + image: dokken/centos-stream-8 + pid_one_command: /usr/lib/systemd/systemd + + - name: centos-stream-9 + driver: + image: dokken/centos-stream-9 + pid_one_command: /usr/lib/systemd/systemd + + - name: debian-9 + driver: + image: dokken/debian-9 + pid_one_command: /bin/systemd + - name: debian-10 driver: image: dokken/debian-10 @@ -30,19 +52,44 @@ platforms: image: dokken/debian-11 pid_one_command: /bin/systemd - - name: centos-7 + - name: debian-12 driver: - image: dokken/centos-7 + image: dokken/debian-12 + pid_one_command: /bin/systemd + + - name: fedora-latest + driver: + image: dokken/fedora-latest pid_one_command: /usr/lib/systemd/systemd - - name: centos-stream-8 + - name: opensuse-leap-15 driver: - image: dokken/centos-stream-8 + image: dokken/opensuse-leap-15 pid_one_command: /usr/lib/systemd/systemd - - name: fedora-latest + - name: oraclelinux-7 driver: - image: dokken/fedora-latest + image: dokken/oraclelinux-7 + pid_one_command: /usr/lib/systemd/systemd + + - name: oraclelinux-8 + driver: + image: dokken/oraclelinux-8 + pid_one_command: /usr/lib/systemd/systemd + + - name: oraclelinux-9 + driver: + image: dokken/oraclelinux-9 + pid_one_command: /usr/lib/systemd/systemd + + - name: rockylinux-8 + driver: + image: dokken/rockylinux-8 + pid_one_command: /usr/lib/systemd/systemd + + - name: rockylinux-9 + driver: + image: dokken/rockylinux-9 pid_one_command: /usr/lib/systemd/systemd - name: ubuntu-18.04 @@ -55,12 +102,12 @@ platforms: image: dokken/ubuntu-20.04 pid_one_command: /bin/systemd - - name: opensuse-leap-15 + - name: ubuntu-22.04 driver: - image: dokken/opensuse-leap-15 - pid_one_command: /usr/lib/systemd/systemd + image: dokken/ubuntu-22.04 + pid_one_command: /bin/systemd - - name: rockylinux-8 + - name: ubuntu-23.04 driver: - image: dokken/rockylinux-8 - pid_one_command: /usr/lib/systemd/systemd + image: dokken/ubuntu-23.04 + pid_one_command: /bin/systemd diff --git a/kitchen.exec.yml b/kitchen.exec.yml new file mode 100644 index 0000000..ba7b2a9 --- /dev/null +++ b/kitchen.exec.yml @@ -0,0 +1,7 @@ +--- +driver: { name: exec } +transport: { name: exec } + +platforms: + - name: macos-latest + - name: windows-latest diff --git a/kitchen.global.yml b/kitchen.global.yml new file mode 100644 index 0000000..a382fcd --- /dev/null +++ b/kitchen.global.yml @@ -0,0 +1,38 @@ +--- +provisioner: + name: chef_infra + product_name: chef + product_version: <%= ENV['CHEF_VERSION'] || 'latest' %> + channel: stable + install_strategy: once + chef_license: accept + enforce_idempotency: <%= ENV['ENFORCE_IDEMPOTENCY'] || true %> + multiple_converge: <%= ENV['MULTIPLE_CONVERGE'] || 2 %> + deprecations_as_errors: true + log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %> + +verifier: + name: inspec + +platforms: + - name: almalinux-8 + - name: almalinux-9 + - name: amazonlinux-2023 + - name: centos-7 + - name: centos-stream-8 + - name: centos-stream-9 + - name: debian-9 + - name: debian-10 + - name: debian-11 + - name: debian-12 + - name: fedora-latest + - name: opensuse-leap-15 + - name: oraclelinux-7 + - name: oraclelinux-8 + - name: oraclelinux-9 + - name: rockylinux-8 + - name: rockylinux-9 + - name: ubuntu-18.04 + - name: ubuntu-20.04 + - name: ubuntu-22.04 + - name: ubuntu-23.04 diff --git a/metadata.rb b/metadata.rb index c6b7980..e26acdf 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,8 +3,8 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Installs Snort IDS packages' -version '5.0.3' -chef_version '>= 15.5' +version '5.0.8' +chef_version '>= 15.0' source_url 'https://github.com/sous-chefs/snort' issues_url 'https://github.com/sous-chefs/snort/issues' diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..7e7a8ba --- /dev/null +++ b/renovate.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:base"], + "packageRules": [{ + "groupName": "Actions", + "matchUpdateTypes": ["patch", "pin", "digest"], + "automerge": true, + "addLabels": ["Release: Patch", "Skip: Announcements"] + }, + { + "groupName": "Actions", + "matchUpdateTypes": ["major"], + "automerge": false, + "addLabels": ["Release: Patch", "Skip: Announcements"] + } + ] +}