@fabasoad/sarif-to-slack 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ *.json linguist-language=JSON-with-Comments
@@ -0,0 +1 @@
1
+ * @fabasoad
@@ -0,0 +1,9 @@
1
+ ---
2
+ custom:
3
+ [
4
+ "https://www.bitcoinqrcodemaker.com/?style=bitcoin&address=145HwyQAcv4vrzUumJhu7nWGAVBysX9jJH&prefix=on",
5
+ "https://paypal.me/fabasoad",
6
+ ]
7
+ github: ["fabasoad"]
8
+ ko_fi: fabasoad
9
+ liberapay: fabasoad
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: fabasoad
7
+
8
+ ---
9
+
10
+ #### Describe the bug
11
+
12
+ A clear and concise description of what the bug is.
13
+
14
+ #### Steps to Reproduce
15
+
16
+ 1. Run '...'
17
+ 2. See error
18
+
19
+ #### Expected behavior
20
+
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ #### Actual behavior
24
+
25
+ A clear and concise description of what is happening now.
26
+
27
+ #### Screenshots
28
+
29
+ If applicable, add screenshots to help explain your problem.
30
+
31
+ #### Technical information (please complete the following information)
32
+
33
+ - OS: [e.g. Windows 10 Enterprise v.1909 (OS Build 18363.720)]
34
+ - `sarif-to-slack-action` version [e.g. 0.1.0]
35
+
36
+ #### Additional context
37
+
38
+ Add any other context about the problem here.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: fabasoad
7
+
8
+ ---
9
+
10
+ ### Is your feature request related to a problem? Please describe
11
+
12
+ A clear and concise description of what the problem is. Ex. I'm always
13
+ frustrated when [...]
14
+
15
+ ### Describe the solution you'd like
16
+
17
+ A clear and concise description of what you want to happen.
18
+
19
+ ### Describe alternatives you've considered
20
+
21
+ A clear and concise description of any alternative solutions or features you've
22
+ considered.
23
+
24
+ ### Additional context
25
+
26
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,11 @@
1
+ ---
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: "github-actions"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "monthly"
8
+ reviewers:
9
+ - "fabasoad"
10
+ labels:
11
+ - "dependencies"
@@ -0,0 +1,59 @@
1
+ <!-- markdownlint-disable-file MD041 -->
2
+
3
+ ## Pull request checklist
4
+
5
+ Please check if your PR fulfills the following requirements:
6
+
7
+ - [ ] I have read the [CONTRIBUTING](https://github.com/fabasoad/sarif-to-slack-action/blob/main/CONTRIBUTING.md)
8
+ doc.
9
+ - [ ] Tests for the changes have been added (for bug fixes / features).
10
+ - [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features).
11
+ - [ ] Build (`yarn run build`) was run locally and any changes were pushed.
12
+ - [ ] Tests (`yarn test`) has passed locally and any fixes were made for failures.
13
+
14
+ ## Pull request type
15
+
16
+ <!-- Please do not submit updates to dependencies unless it fixes an issue. -->
17
+
18
+ <!-- Please try to limit your pull request to one type, submit multiple pull
19
+ requests if needed. -->
20
+
21
+ Please check the type of change your PR introduces:
22
+
23
+ - [ ] Bugfix
24
+ - [ ] Feature
25
+ - [ ] Code style update (formatting, renaming)
26
+ - [ ] Refactoring (no functional changes, no api changes)
27
+ - [ ] Build related changes
28
+ - [ ] Documentation content changes
29
+ - [ ] Other (please describe):
30
+
31
+ ## What is the current behavior
32
+ <!-- Please describe the current behavior that you are modifying, or link to a
33
+ relevant issue. -->
34
+
35
+ ## What is the new behavior
36
+ <!-- Please describe the behavior or changes that are being added by this PR. -->
37
+
38
+ -
39
+ -
40
+ -
41
+
42
+ ## Does this introduce a breaking change
43
+
44
+ - [ ] Yes
45
+ - [ ] No
46
+
47
+ <!-- If this introduces a breaking change, please describe the impact and
48
+ migration path for existing applications below. -->
49
+
50
+ ## Other information
51
+
52
+ <!-- Any other information that is important to this PR such as screenshots of
53
+ how the component looks before and after the change. -->
54
+ <!-- This document was adapted from the open-source [appium/appium](https://github.com/appium/appium/blob/master/.github/PULL_REQUEST_TEMPLATE.md)
55
+ repository. -->
56
+
57
+ ---
58
+
59
+ Closes #{IssueNumber}
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: Linting
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ pull_request: {}
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ js-lint:
12
+ name: JS Lint
13
+ uses: fabasoad/reusable-workflows/.github/workflows/wf-js-lint.yml@main
14
+ pre-commit:
15
+ name: Pre-commit
16
+ uses: fabasoad/reusable-workflows/.github/workflows/wf-pre-commit.yml@main
17
+ with:
18
+ skip-hooks: "audit, build, lint, test"
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: Release
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ workflow_dispatch:
6
+ inputs:
7
+ bump-strategy:
8
+ description: "Type of version bump to apply"
9
+ required: true
10
+ default: "patch"
11
+ type: choice
12
+ options:
13
+ - "patch"
14
+ - "minor"
15
+ - "major"
16
+
17
+ jobs:
18
+ publish:
19
+ name: Release ${{ github.event.inputs.bump-strategy }}
20
+ runs-on: ubuntu-latest
21
+ timeout-minutes: 15
22
+ permissions:
23
+ contents: write
24
+ packages: write
25
+ outputs:
26
+ ref: ${{ steps.metadata.outputs.ref }}
27
+ ref-name: ${{ steps.metadata.outputs.ref-name }}
28
+ steps:
29
+ - name: Checkout ${{ github.repository }}
30
+ uses: actions/checkout@v4
31
+
32
+ - name: Setup Node
33
+ uses: actions/setup-node@v4
34
+ with:
35
+ node-version-file: ".tool-versions"
36
+ cache: "npm"
37
+ cache-dependency-path: "package-lock.json"
38
+
39
+ - name: Install dependencies
40
+ run: npm ci
41
+
42
+ - name: Bump version
43
+ run: |
44
+ git config user.email "fabasoad@gmail.com"
45
+ git config user.name "fabasoad"
46
+ npm run version:${{ github.event.inputs.bump-strategy }}
47
+
48
+ - name: Install jq
49
+ uses: dcarbone/install-jq-action@v3
50
+
51
+ - name: Get metadata
52
+ id: metadata
53
+ run: |
54
+ version=$(jq -r '.version' package.json)
55
+ echo "ref=refs/tags/v${version}" >> "$GITHUB_OUTPUT"
56
+ echo "ref-name=v${version}" >> "$GITHUB_OUTPUT"
57
+
58
+ - name: Publish to npm registry
59
+ uses: JS-DevTools/npm-publish@v3
60
+ with:
61
+ token: "${{ secrets.NPM_TOKEN }}"
62
+
63
+ - name: Publish to GitHub Packages
64
+ uses: JS-DevTools/npm-publish@v3
65
+ with:
66
+ token: "${{ secrets.GITHUB_TOKEN }}"
67
+ registry: "https://npm.pkg.github.com"
68
+ github:
69
+ name: GitHub
70
+ needs: [publish]
71
+ uses: fabasoad/reusable-workflows/.github/workflows/wf-github-release.yml@main
72
+ with:
73
+ bump-tags: false
74
+ ref: ${{ needs.publish.outputs.ref }}
75
+ ref-name: ${{ needs.publish.outputs.ref-name }}
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Security
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ pull_request: {}
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ sast:
12
+ name: SAST
13
+ permissions:
14
+ contents: read
15
+ security-events: write
16
+ uses: fabasoad/reusable-workflows/.github/workflows/wf-security-sast.yml@main
17
+ with:
18
+ code-scanning: true
19
+ sca: true
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: Labels
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ push:
6
+ branches:
7
+ - main
8
+ workflow_dispatch: {}
9
+
10
+ jobs:
11
+ maintenance:
12
+ name: Maintenance
13
+ uses: fabasoad/reusable-workflows/.github/workflows/wf-sync-labels.yml@main
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: Unit Tests
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ pull_request:
6
+ paths:
7
+ - .github/workflows/unit-tests.yml
8
+ - .tool-versions
9
+ - jest.config.json
10
+ - package.json
11
+ - src/**
12
+ - tsconfig.json
13
+ push:
14
+ branches:
15
+ - main
16
+ workflow_dispatch: {}
17
+
18
+ jobs:
19
+ jest:
20
+ name: Jest
21
+ uses: fabasoad/reusable-workflows/.github/workflows/wf-js-unit-tests.yml@main
22
+ secrets: inherit # pragma: allowlist secret
@@ -0,0 +1,12 @@
1
+ ---
2
+ name: License
3
+
4
+ on: # yamllint disable-line rule:truthy
5
+ schedule:
6
+ # Every January 1st at 14:00 JST
7
+ - cron: "0 5 1 1 *"
8
+
9
+ jobs:
10
+ maintenance:
11
+ name: Maintenance
12
+ uses: fabasoad/reusable-workflows/.github/workflows/wf-update-license.yml@main
@@ -0,0 +1,9 @@
1
+ ---
2
+ default: true
3
+ MD013:
4
+ code_blocks: false
5
+ tables: false
6
+ MD041: false
7
+ no-inline-html:
8
+ allowed_elements:
9
+ - img
@@ -0,0 +1 @@
1
+ node_modules
@@ -0,0 +1,105 @@
1
+ ---
2
+ default_install_hook_types: ["pre-commit", "pre-push"]
3
+ default_stages: ["pre-commit", "pre-push"]
4
+ exclude: ^(dist/.*|etc/.*|lib/.*|node_modules/.*|temp/.*)$
5
+ minimum_pre_commit_version: 4.0.0
6
+ repos:
7
+ - repo: local
8
+ hooks:
9
+ - id: build
10
+ name: Build
11
+ entry: make build
12
+ language: system
13
+ pass_filenames: false
14
+ verbose: true
15
+ stages: ["pre-push"]
16
+ - id: lint
17
+ name: Lint
18
+ entry: make lint
19
+ language: system
20
+ pass_filenames: false
21
+ verbose: false
22
+ stages: ["pre-push"]
23
+ - id: test
24
+ name: Unit tests
25
+ entry: make test
26
+ language: system
27
+ pass_filenames: false
28
+ verbose: true
29
+ stages: ["pre-push"]
30
+ # Security
31
+ - id: audit
32
+ name: NPM audit
33
+ entry: make audit
34
+ language: system
35
+ pass_filenames: false
36
+ verbose: false
37
+ stages: ["pre-push"]
38
+ - repo: https://github.com/Yelp/detect-secrets
39
+ rev: v1.5.0
40
+ hooks:
41
+ - id: detect-secrets
42
+ - repo: https://github.com/gitleaks/gitleaks
43
+ rev: v8.27.2
44
+ hooks:
45
+ - id: gitleaks
46
+ - repo: https://github.com/fabasoad/pre-commit-snyk
47
+ rev: v1.0.2
48
+ hooks:
49
+ - id: snyk-test
50
+ args:
51
+ - --snyk-args=--all-projects --severity-threshold=low
52
+ - --hook-args=--log-level debug
53
+ stages: ["pre-push"]
54
+ - repo: https://github.com/fabasoad/pre-commit-grype
55
+ rev: v0.6.3
56
+ hooks:
57
+ - id: grype-dir
58
+ args:
59
+ - --grype-args=--by-cve --fail-on=low --exclude=**/node_modules
60
+ - --hook-args=--log-level debug
61
+ stages: ["pre-push"]
62
+ - repo: https://github.com/google/osv-scanner
63
+ rev: v2.0.3
64
+ hooks:
65
+ - id: osv-scanner
66
+ args:
67
+ - --lockfile=package-lock.json
68
+ verbose: true
69
+ stages: ["pre-push"]
70
+ # Markdown
71
+ - repo: https://github.com/igorshubovych/markdownlint-cli
72
+ rev: v0.45.0
73
+ hooks:
74
+ - id: markdownlint-fix
75
+ stages: ["pre-commit"]
76
+ # Yaml
77
+ - repo: https://github.com/adrienverge/yamllint
78
+ rev: v1.37.1
79
+ hooks:
80
+ - id: yamllint
81
+ stages: ["pre-push"]
82
+ # GitHub Actions
83
+ - repo: https://github.com/rhysd/actionlint
84
+ rev: v1.7.7
85
+ hooks:
86
+ - id: actionlint
87
+ args: ["-pyflakes="]
88
+ stages: ["pre-commit"]
89
+ # Other
90
+ - repo: https://github.com/pre-commit/pre-commit-hooks
91
+ rev: v5.0.0
92
+ hooks:
93
+ - id: check-merge-conflict
94
+ - id: check-json
95
+ exclude: ^(api-extractor\.json|dist\/tsdoc-metadata\.json)$
96
+ stages: ["pre-push"]
97
+ - id: check-toml
98
+ stages: ["pre-push"]
99
+ - id: detect-private-key
100
+ - id: end-of-file-fixer
101
+ - id: mixed-line-ending
102
+ args: ["--fix=lf"]
103
+ - id: no-commit-to-branch
104
+ stages: ["pre-commit"]
105
+ - id: trailing-whitespace
package/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ nodejs 24.3.0
package/.yamllint.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ extends: default
3
+
4
+ rules:
5
+ line-length:
6
+ max: 165
7
+ level: error
@@ -0,0 +1,61 @@
1
+ # Contributing guidance
2
+
3
+ We love your input! We want to make contributing to this project as easy and
4
+ transparent as possible, whether it's:
5
+
6
+ - Reporting a bug
7
+ - Discussing the current state of the code
8
+ - Submitting a fix
9
+ - Proposing new features
10
+ - Becoming a maintainer
11
+
12
+ ## We develop with GitHub
13
+
14
+ We use GitHub to host code, to track issues and feature requests, as well as
15
+ accept pull requests.
16
+
17
+ ## We use GitHub flow, so all code changes happen through pull requests
18
+
19
+ Pull requests are the best way to propose changes to the codebase (we use
20
+ [GitHub flow](https://guides.github.com/introduction/flow/index.html)). We
21
+ actively welcome your pull requests:
22
+
23
+ 1. Fork the repo and create your branch from `main`.
24
+ 2. If you've added code that should be tested, add tests.
25
+ 3. If you've changed APIs, update the documentation.
26
+ 4. Ensure the test suite passes.
27
+ 5. Make sure your code lints.
28
+ 6. Issue that pull request!
29
+
30
+ ## Any contributions you make will be under the MIT Software License
31
+
32
+ In short, when you submit code changes, your submissions are understood to be
33
+ under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers
34
+ the project. Feel free to contact the maintainers if that's a concern.
35
+
36
+ ## Report bugs using [GitHub Issues](https://github.com/fabasoad/sarif-to-slack-action/issues)
37
+
38
+ We use GitHub issues to track public bugs. Report a bug by opening a new issue.
39
+ It's that easy!
40
+
41
+ ## Create issue using provided GitHub issue templates
42
+
43
+ This repository has issue templates for bug report and feature request. Please
44
+ use them to create an issue and fill all required fields.
45
+
46
+ ## Use a consistent coding style
47
+
48
+ Please follow all the rules from [this](https://google.github.io/styleguide/jsguide.html)
49
+ great guide provided by Google for coding style except of following coding styles:
50
+
51
+ - File names must be all lowercase and may include dashes (-).
52
+
53
+ ## License
54
+
55
+ By contributing, you agree that your contributions will be licensed under its
56
+ MIT License.
57
+
58
+ ## References
59
+
60
+ This document was adapted from the open-source contribution guidelines provided
61
+ by [briandk](https://gist.github.com/briandk/3d2e8b3ec8daf5a27a62).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Yevhen Fabizhevskyi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Makefile ADDED
@@ -0,0 +1,42 @@
1
+ .DEFAULT_GOAL := build
2
+
3
+ .PHONY: audit
4
+ audit:
5
+ @npm audit --all
6
+
7
+ .PHONY: build
8
+ build:
9
+ @npm run build
10
+
11
+ .PHONY: clean
12
+ clean:
13
+ @npm run clean
14
+
15
+ .PHONY: install
16
+ install:
17
+ @npm install
18
+
19
+ .PHONY: reinstall
20
+ reinstall:
21
+ @make clean
22
+ @npm run clean:unsafe
23
+ @make install
24
+
25
+ .PHONY: lint
26
+ lint:
27
+ @npm run lint
28
+
29
+ .PHONY: test
30
+ test:
31
+ @npm run test
32
+
33
+ .PHONY: npm/update
34
+ npm/update:
35
+ @npm update
36
+
37
+ .PHONY: pre-commit/update
38
+ pre-commit/update:
39
+ @pre-commit autoupdate
40
+
41
+ .PHONY: update
42
+ update: npm/update pre-commit/update
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # SARIF to Slack TypeScript Library
2
+
3
+ [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
4
+ ![Releases](https://img.shields.io/github/v/release/fabasoad/sarif-to-slack-action?include_prereleases)
5
+ ![unit-tests](https://github.com/fabasoad/sarif-to-slack-action/actions/workflows/unit-tests.yml/badge.svg)
6
+ ![security](https://github.com/fabasoad/sarif-to-slack-action/actions/workflows/security.yml/badge.svg)
7
+ ![linting](https://github.com/fabasoad/sarif-to-slack-action/actions/workflows/linting.yml/badge.svg)
8
+ [![codecov](https://codecov.io/gh/fabasoad/sarif-to-slack-action/branch/main/graph/badge.svg?token=908QOYME6H)](https://codecov.io/gh/fabasoad/sarif-to-slack-action)
9
+
10
+ TypeScript library to send results of SARIF file to Slack webhook URL.
11
+
12
+ ## Contents
13
+
14
+ <!-- TOC -->
15
+ * [SARIF to Slack TypeScript Library](#sarif-to-slack-typescript-library)
16
+ * [Contents](#contents)
17
+ * [How to use](#how-to-use)
18
+ * [Sample](#sample)
19
+ * [Contributions](#contributions)
20
+ <!-- TOC -->
21
+
22
+ ## How to use
23
+
24
+ ```typescript
25
+
26
+ ```
27
+
28
+ ## Sample
29
+
30
+ <img alt="Sample" src="sample.png" width="450"/>
31
+
32
+ ## Contributions
33
+
34
+ ![Alt](https://repobeats.axiom.co/api/embed/a0989b54292b5c9e03ce1dd4cb23f68072f88f46.svg "Repobeats analytics image")