https://github.com/scanoss/semgrep
This repository provides the sources to service Semgrep layer
https://github.com/scanoss/semgrep
Last synced: 5 months ago
JSON representation
This repository provides the sources to service Semgrep layer
- Host: GitHub
- URL: https://github.com/scanoss/semgrep
- Owner: scanoss
- License: gpl-2.0
- Created: 2023-10-06T11:51:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-10-01T11:38:41.000Z (8 months ago)
- Last Synced: 2025-10-01T13:22:17.492Z (8 months ago)
- Language: Go
- Size: 906 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# SCANOSS Platform 2.0 Semgrep
Welcome to the Semgrep server for SCANOSS Platform 2.0
**Warning** Work In Progress **Warning**
## Repository Structure
This repository is made up of the following components:
* ?
## Configuration
Environmental variables are fed in this order:
dot-env --> env.json --> Actual Environment Variable
These are the supported configuration arguments:
```
APP_NAME="SCANOSS Semgrep Server"
APP_PORT=50051
APP_MODE=dev
APP_DEBUG=false
DB_DRIVER=postgres
DB_HOST=localhost
DB_USER=scanoss
DB_PASSWD=
DB_SCHEMA=scanoss
DB_SSL_MODE=disable
DB_DSN=
```
## Docker Environment
The Semgrep server can be deployed as a Docker container.
Adjust configurations by updating an .env file in the root of this repository.
### How to build
You can build your own image of the SCANOSS Semgrep Server with the ```docker build``` command as follows.
```bash
make ghcr_build
```
### How to run
Run the SCANOSS Semgrep Server Docker image by specifying the environmental file to be used with the ```--env-file``` argument.
You may also need to expose the ```APP_PORT``` on a given ```interface:port``` with the ```-p``` argument.
```bash
docker run -it -v "$(pwd)":"$(pwd)" -p 50051:50051 ghcr.io/scanoss/scanoss-dependencies -json-config $(pwd)/config/app-config-docker-local-dev.json -debug
```
## Development
To run locally on your desktop, please use the following command:
```shell
go run cmd/server/main.go -json-config config/app-config-dev.json -debug
```
After changing a Semgrep version, please run the following command:
```shell
go mod tidy -compat=1.17
```
https://mholt.github.io/json-to-go/