Skip to content

Commit 9f8315c

Browse files
Bump anchore/scan-action from 3 to 4 (#8)
* Bump anchore/scan-action from 3 to 4 Bumps [anchore/scan-action](https://github.com/anchore/scan-action) from 3 to 4. - [Release notes](https://github.com/anchore/scan-action/releases) - [Changelog](https://github.com/anchore/scan-action/blob/main/CHANGELOG.md) - [Commits](anchore/scan-action@v3...v4) --- updated-dependencies: - dependency-name: anchore/scan-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Bump gitleaks/gitleaks from 8.18.2 to 8.18.4 * Add fabasoad/pre-commit-grype hook --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: fabasoad <fabasoad@gmail.com>
1 parent cf46f02 commit 9f8315c

4 files changed

Lines changed: 60 additions & 88 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,6 @@ on: # yamllint disable-line rule:truthy
77
- "v*.*.*"
88

99
jobs:
10-
create-release:
11-
name: Create release
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Checkout ${{ github.repository }}
15-
uses: actions/checkout@v4
16-
with:
17-
fetch-depth: 0
18-
- name: Get changelog
19-
id: changelog
20-
uses: simbo/changes-since-last-release-action@v1
21-
- name: Create release
22-
uses: softprops/action-gh-release@v2
23-
with:
24-
tag_name: ${{ github.ref }}
25-
name: ${{ github.ref_name }}
26-
token: ${{ secrets.GITHUB_TOKEN }}
27-
body: |
28-
# Changelog
29-
30-
${{ steps.changelog.outputs.log }}
31-
draft: false
32-
prerelease: false
33-
- name: Bump tags
34-
uses: fischerscode/tagger@v0
35-
with:
36-
prefix: v
10+
github:
11+
name: GitHub
12+
uses: fabasoad/reusable-workflows/.github/workflows/wf-github-release.yml@main

.github/workflows/security.yml

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,43 @@ on: # yamllint disable-line rule:truthy
77
branches:
88
- main
99

10-
defaults:
11-
run:
12-
shell: sh
13-
1410
jobs:
15-
code-scanning:
16-
name: Code scanning
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout ${{ github.repository }}
20-
uses: actions/checkout@v4
21-
- name: Initialize CodeQL
22-
uses: github/codeql-action/init@v3
23-
with:
24-
languages: "javascript"
25-
- name: Perform CodeQL Analysis
26-
id: codeql-analysis
27-
uses: github/codeql-action/analyze@v3
28-
- name: Upload to GHAS
29-
if: always()
30-
uses: github/codeql-action/upload-sarif@v3
31-
with:
32-
category: "code-scanning"
33-
sarif_file: "${{ steps.codeql-analysis.outputs.sarif-output }}"
34-
directory-scanning:
35-
name: Directory scanning
11+
build-image:
12+
name: Build image
3613
runs-on: ubuntu-latest
14+
outputs:
15+
artifact-name: "${{ steps.artifact.outputs.name }}"
3716
steps:
3817
- name: Checkout ${{ github.repository }}
3918
uses: actions/checkout@v4
40-
- name: Scan current project
41-
id: scan-directory
42-
uses: anchore/scan-action@v3
19+
- name: Build image
20+
id: build-image
21+
uses: docker/build-push-action@v6
4322
with:
44-
by-cve: "true"
45-
path: "."
46-
- name: Upload to GHAS
23+
push: false
24+
- name: Save image
25+
id: artifact
26+
run: |
27+
artifact_name="$(date +%s)"
28+
archive_path="${RUNNER_TEMP}/${artifact_name}.tar"
29+
docker save --output "${archive_path}" "${{ steps.build-image.outputs.digest }}"
30+
echo "path=${archive_path}" >> "$GITHUB_OUTPUT"
31+
echo "name=${artifact_name}" >> "$GITHUB_OUTPUT"
32+
- name: Upload artifact
4733
if: always()
48-
uses: github/codeql-action/upload-sarif@v3
34+
uses: actions/upload-artifact@v4
4935
with:
50-
category: "directory-scanning"
51-
sarif_file: "${{ steps.scan-directory.outputs.sarif }}"
36+
name: "${{ steps.artifact.outputs.name }}"
37+
path: "${{ steps.artifact.outputs.path }}"
38+
retention-days: "1"
39+
compression-level: "0"
40+
sast:
41+
name: SAST
42+
needs: ["build-image"]
43+
permissions:
44+
contents: read
45+
security-events: write
46+
uses: fabasoad/reusable-workflows/.github/workflows/wf-security-sast.yml@main
47+
with:
48+
image: true
49+
image-artifact-name: "${{ needs.build-image.outputs.artifact-name }}"
Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
---
2-
name: Update license
2+
name: License
33

44
on: # yamllint disable-line rule:truthy
55
schedule:
66
- cron: "0 5 1 1 *"
77

88
jobs:
9-
run:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
with:
14-
fetch-depth: 0
15-
- uses: FantasticFiasco/action-update-license-year@v3
16-
with:
17-
token: ${{ secrets.GITHUB_TOKEN }}
18-
assignees: ${{ github.repository_owner }}
19-
labels: enhancement
20-
prTitle: Update license copyright year to {{currentYear}}
21-
prBody: |
22-
## Changelog
23-
24-
- Update license copyright year to {{currentYear}}
25-
26-
---
27-
28-
Powered by [FantasticFiasco/action-update-license-year](https://github.com/FantasticFiasco/action-update-license-year)
9+
maintenance:
10+
name: Maintenance
11+
uses: fabasoad/reusable-workflows/.github/workflows/wf-update-license.yml@main

.pre-commit-config.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,30 @@ minimum_pre_commit_version: 2.18.0
55
repos:
66
# Security
77
- repo: https://github.com/Yelp/detect-secrets
8-
rev: v1.4.0
8+
rev: v1.5.0
99
hooks:
1010
- id: detect-secrets
1111
- repo: https://github.com/gitleaks/gitleaks
12-
rev: v8.18.2
12+
rev: v8.18.4
1313
hooks:
1414
- id: gitleaks
15+
- repo: https://github.com/fabasoad/pre-commit-grype
16+
rev: v0.6.0
17+
hooks:
18+
- id: grype-dir
19+
args:
20+
- --grype-args=--by-cve --fail-on=low
21+
- --hook-args=--log-level debug
22+
stages: ["push"]
1523
# Dockerfile
1624
- repo: https://github.com/hadolint/hadolint
17-
rev: v2.12.1-beta
25+
rev: v2.13.0-beta
1826
hooks:
1927
- id: hadolint
2028
stages: ["push"]
2129
# Markdown
2230
- repo: https://github.com/igorshubovych/markdownlint-cli
23-
rev: v0.39.0
31+
rev: v0.41.0
2432
hooks:
2533
- id: markdownlint-fix
2634
stages: ["commit"]
@@ -32,11 +40,18 @@ repos:
3240
stages: ["push"]
3341
# GitHub Actions
3442
- repo: https://github.com/rhysd/actionlint
35-
rev: v1.6.27
43+
rev: v1.7.1
3644
hooks:
3745
- id: actionlint
3846
args: ["-pyflakes="]
39-
stages: ["push"]
47+
stages: ["commit"]
48+
# Shell
49+
- repo: https://github.com/openstack/bashate
50+
rev: 2.1.1
51+
hooks:
52+
- id: bashate
53+
args: ["-i", "E003,E006"]
54+
stages: ["commit"]
4055
# Other
4156
- repo: https://github.com/pre-commit/mirrors-prettier
4257
rev: v3.1.0

0 commit comments

Comments
 (0)