HORUSEC-ANALYTIC
HORUSEC-ANALYTIC is responsible for read database and show also data generated by analysis and return for view dashboard in horusec-manager
This service have integration with GraphQL for return details of the vulnerabilities found, and also others routes for analytics content.
You can see more details about this service in image /assets/horusec-analytic.jpg
Running
To run the service you can run the follow command
go run ./horusec-analytic/cmd/app/main.go
And you see the log
service running on port :8000
swagger running on url: http://localhost:8000/swagger/index.html
Generate new version
To generate a new version go to the root directory you can run the follow command, and it will generate a new version on dokerhub
.
make update-writer
Environments
To change variables environment to run your analysis also you set new values.
Environment Name |
Default Value |
Description |
HORUSEC_SWAGGER_HOST |
localhost |
This environment get host to run in swagger |
HORUSEC_DATABASE_SQL_URI |
postgresql://root:root@localhost:5432/horusec_db?sslmode=disable |
This environment get uri to connect on database POSTGRES |
HORUSEC_DATABASE_SQL_DIALECT |
postgres |
This environment get dialect to connect on database POSTGRES |
HORUSEC_DATABASE_SQL_LOG_MODE |
false |
This environment get bool to enable logs on POSTGRES |
HORUSEC_PORT |
8005 |
This environment get the port that the service will start |
Swagger
To update swagger.json, you need run command into root horusec-analytic folder
swag init -g ./cmd/app/main.go