Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/scanoss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: SCANOSS

on:
pull_request:
push:
branches:
- "*"
workflow_dispatch:

permissions:
contents: read
pull-requests: write
checks: write
actions: read

jobs:
scanoss-code-scan:
name: SCANOSS Code Scan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run SCANOSS Code Scan
id: scanoss-code-scan-step
uses: scanoss/code-scan-action@v1
with:
policies: undeclared
api.url: https://api.scanoss.com/scan/direct
api.key: ${{ secrets.SC_API_KEY }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ docs/build
!docs/source/_static/*.json
!scanoss-settings-schema.json
.DS_Store
!scanoss.json
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ repos:
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/scanoss/pre-commit-hooks
rev: v0.2.0
hooks:
- id: scanoss-check-undeclared-code

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ To enable dependency scanning, an extra tool is required: scancode-toolkit
pip3 install -r requirements-scancode.txt
```

### Pre-commit Setup
This project uses pre-commit hooks to ensure code quality and consistency. To set up pre-commit, run:
```bash
pip3 install pre-commit
pre-commit install
```

This will install the pre-commit tool and set up the git hooks defined in the `.pre-commit-config.yaml` file to run automatically on each commit.

### Devcontainer Setup
To simplify the development environment setup, a devcontainer configuration is provided. This allows you to develop inside a containerized environment with all necessary dependencies pre-installed.

Expand Down
33 changes: 33 additions & 0 deletions scanoss.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"settings": {
"skip": {
"patterns": {},
"sizes": {}
}
},
"bom": {
"include": [
{
"purl": "pkg:github/scanoss/scanoss.py"
}
],
"remove": [
{
"path": "docs/make.bat",
"purl": "pkg:github/twilight-logic/ar488"
},
{
"path": "src/protoc_gen_swagger/options/annotations_pb2_grpc.py",
"purl": "pkg:pypi/bauplan"
},
{
"path": "src/protoc_gen_swagger/options/openapiv2_pb2_grpc.py",
"purl": "pkg:pypi/bauplan"
},
{
"path": "src/scanoss/api/common/v2/scanoss_common_pb2_grpc.py",
"purl": "pkg:pypi/bauplan"
}
]
}
}