Skip to content

Commit

Permalink
Develop (#190)
Browse files Browse the repository at this point in the history
* feature/automatic-csproj (#23)

* adding dynamic detection of csproj, yarn.lock, package-lock.json and requirements.txt

* file path by ext unity tests

* Template email of organization invited (#22)

* e-mail Added the template of e-mail to a user is invited to the organization

* Fixing go lint

* 🔒 The screen dashboard of organization is visible something the admin users (#26)

* Organizing i18n values in frontend (#30)

* Rewrite i18n values for external pages and dashsboard screen

* Adjusting i18 values in repositories screen

* 🛠️  Adjusting redirect routes when the call is external of manager (#19)

* Hotfix/fixing redirect and output bigger (#21)

* Fixing redirect in email template reset-password

* Fixing code output when exists many content and bad read

* Fixing fmt and set total output to down

* Hotfix/unique names (#28)

* Adding unique names migration

* Adding validations to unique names and unity tests

* Fixing swagger in horusec-analytics (#27)

* Add i18n values to enUS

Co-authored-by: Wilian Gabriel <[email protected]>
Co-authored-by: nathanmartinszup <[email protected]>

* Removing fields type, vulnerableBellow and version from Vulnerability (#24)

* Removing fields type, vulnerableBellow and version from Vulnerability

* Fixing e2e and unit testss

* Change pipeline to use docker-compose

* Fixing docker-compose.test

* Fixing deployment

* Fixing compose

* Merge master into develop (#36)

* 🛠️  Adjusting redirect routes when the call is external of manager (#19)

* Hotfix/fixing redirect and output bigger (#21)

* Fixing redirect in email template reset-password

* Fixing code output when exists many content and bad read

* Fixing fmt and set total output to down

* Hotfix/unique names (#28)

* Adding unique names migration

* Adding validations to unique names and unity tests

* Fixing swagger in horusec-analytics (#27)

* Hotfix/change images generate token (#31)

* Change images to generate token

* Adding gif usage horusec

* Adding gif usage horusec

Co-authored-by: Lucas Bruno <[email protected]>
Co-authored-by: nathanmartinszup <[email protected]>

* Adding company role in get all companies (#33)

* Adding company role in get all companies

* Adding unity tests

* Tokens of organization (#32)

* 🔑 Handler tokens of organization

* 🛡️  Added rules in manager organizations

* Not found screen (#34)

* 👷 Initial structure to not found page

* 👌 Finalizing page of not found

* 🔙 Added option to back to organization screen when in home page

* 🔨 Fixing version in package json

* Fixing error in unique company name not necessary, and removings wrong constraints in database (#38)

* [skip ci] update versioning file

* Added component of pagination (#47)

* CLI docker image (#25)

* Adding cli dockerfile

* Adding horusec as entrypoint

* Removing docker from image

* Adding docker-entrypoint

* Using docker dind

* Downgrade docker dind

* Using entrypoint

* Renaming entrypoint to horusec-cli

* Updating documentation

* Adding license

* Updating vendor

Co-authored-by: Horusec <[email protected]>

* 💅 Adjusting button dialog styles, scrollbar and select component (#48)

* Adjusting the texts in portugueses (#52)

* ✅ Added option to success message from flash message component and added in all handlers (#53)

* Feature/create repository cli (#55)

* Create repository by cli flag, update list repository to list all repositories to company admin

* Adding tests and validation to list all repositories of company if i am admin

* Removing duplicated code to list repositories to company admin

* Removing unnecessary unity test

* Fixing unity tests and adding middleware to company admin

* Adding missing test

* Updating analytic routes by repository to accept admins of company

* Fixing broken e2e tests

Co-authored-by: Wilian Gabriel <[email protected]>

* Frontend false positive (#54)

* Initial strucute for false positive screen

* Finished false posite screen and add supervisor role

* Implementing false-positive and risk accept (#35)

* Change struct of analysis

* Fixing fmt lint entity and create migration files

* Adding get all dto and method

* Fixing migration

* Adding base management repository

* Adding get all vuln management data

* Adding management repository unity tests

* adding management controller get all

* adding get all management data

* adding management handler unity tests

* Adding update method in repository

* Adding update method in controller

* adding management handler put

* Adding management handler unity tests

* Fixing create analysis

* Adding app sec role

* Fixing list vuln management error where vulns are duplicating, fixing swagger errors

* Removing unnecessary nolint and improving code

* Fixing to send analysis correctly to horusec-api

* Adding separated api to update status and type

* Adding new vulnerability status and type enums

* Fixing lint

* Fixing lint errors

* Removing status and updating apis

* Updating migration

* Fixing output to show vulnerability to fix

* Fixing lint and project errors

* Fixing management unit tests

* Fixing errors in list vulns

* Fixing some type errors

* Updating output to print false positive and risk accept

* Start fixing tests

* Fixing tests

* Fixing vulnerabilities unity tests

* Fixing analytic queries

* Fixing tests

* Fixing analytic repositoty unit tests

* Adding tests on cli

* Adding more content

* Fixing hash generator

* Fixing hash generator

* Fixing vulnerability test

* Adding devkit entities and types units tests

* Adding Unit tests

* Adding unit tests

* Fixing license

* Adding analysis tests

* Fixing lint

* fixing e2e tests

* Updating e2e tests

* Fixing tests in repository

* FIxing fmt lint

* Parse horusec analysis response correctly

* Fixing lint

* Fixing errors in vulns details

* Fixing e2e test

* Updating api cors

* Updating cors

Co-authored-by: nathan <[email protected]>
Co-authored-by: lucas.bruno <[email protected]>

* Fixing wrong text in output

* Bugfix/false positive (#58)

* Fixing supervisor middleware validation to company admins

* Fixing load data in vulnerabilities table

* Fixing false positive in CLI

* Updating swagger

* Fixing docs

* Fixing lint

Co-authored-by: lucas.bruno <[email protected]>
Co-authored-by: Wilian Gabriel <[email protected]>

* Fixing regex d34b3ba5-b988-4a0f-9344-467274cd98be (#59)

* Removing deprecated manager (#60)

* Fixing security pipeline in horusec (#61)

* Fixing security pipeline in horusec

* Fixing security pipeline in horusec

* Fixing security pipeline in horusec

* Fixing security pipeline in horusec

* Fixing readme cli

* Fixing readme cli

* Update README.md

* Update README.md

* Change filter to receive Severity and remove Type (#64)

* Feature/improving false positive (#66)

* Adding order by severity and type

* Adding filter by type

* Fixing lint errors and adding unity tests

* Fixing order by error

* Updating swagger

* Fixing fmt errors

* [Frontend] Improvements false positive (#67)

* Added new filter in false positive screen

* Added success messages

* Added tag with color in severity

* List vulnerabilities in management screen to repository members (#68)

* [Frontend] - Improvements false positive (#69)

* Added new filter in false positive screen

* Added success messages

* Added tag with color in severity

* Removing supervisor role in company

* Added permission to handler repository

* Migration deploy hook (#65)

* Adding migration dockerfile

* Improving migration dockerfile

* Using env in migration

* Adding migration template

* Fixing migration template

* Adding migration image script

* Updating helm hook

* Fixing mingration version

* Fixing  service image script builder

Co-authored-by: Horusec <[email protected]>

* Adding api to delete account and permissions (#85)

* Adding api to delete account and permissions

* Adding license in docs

* Adding jwt auth middleware in delete account

* Feature/horusec auth (#62)

* Adding horusec auth base project

* Adding auth handler, with auth types enum and credetials

* Finishing handlers and adding auth controller with factory by type

* Change filter to receive Severity and remove Type

* Adding missing unity tests in devkit

* Adding auth handler tests

* Adding swagger, updating router and configs

* Fixing lint and tests

* Adding horus service authenticate method

* Adding authorize handler

* Updating auth interface

* Adding postgres read

* Adding keycloak service auth and keycloak shared service

* Adding unit test

* Adding horusec roles enum

* Fixing return

* Adding validation to authorize by horus roles

* Renaming packges to horusec

* Fixing some  horusec name errors and unity tests

* Removing nolint and improving code

* Renaming file to horusec

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding horusec service unity testes

* Adding auth controller unity tests and updating mocks

* Adding auth in compose and fixing docs

* Adding auth in compose and fixing docs

* Updating health check

* Fixing lint

* Fixing keycloak unity tests

* Adding unit tests

* Adding unit tests

* Updating middlewares to use auth service

* Fixing auth type

* Fixing tests fmt lint

* Fixing tests fmt lint

* Fixing Security

* Improving code and adding unity tests

* Adding more devkit unity tests

* Adding some unit tests

* Adding middleware service unity tests

* Removing unnecessary test

* Adding horusec auth readme

* Fixing dockerfiles

* Adding validation to actual auth type

* Removing auth type header

* Updating composes

* Removing groups from authorization data

* Updating account, api and analytic readme

* Updating compose with auth url env var

* Updating compose and compose dev

* Fixing unity tests and fmt errors

* Fixing auth pipeline and hashes false positives

* Fixing error that token was static to accept only jwt

* Addding role validation in keycloak

* Fixing token size and swagger error

* Removing bearer from keycloak token

* Adding api to get account id by token and auth type

* Chaging create account from keycloak to auth

* Updating auth swagger

* Improving keycloak devkit service and fixing tests

* Fixing account unity tests

* Fixing account unity tests in auth

* Adding auth unity tests

* Fixing middleware tests

* Fixing fmt error

* Improving interface convertion to avoid conversion error

Co-authored-by: Wilian Gabriel <[email protected]>

* Frontend - Many authentication types (#77)

* 🛸 Added fields in create company and repsitory to LDAP roules

* ⚙️ Separe modules of authenticantion, and add splash animation in login screen

* 🛰  Horusec default authenticator

* 🔑 Add auth environment

* Initialize integration with keycloack

* Adjustin keycloack authentication

* Add get user info in keycloack auth and adjusting logout

* ⚙️ Alter service to create account from keycloak

* 🛠  Adjusting styles, and settings to microfrontend integration and devcraft use

* Fixing keycloack config when in other auth type, and adjusting function types

* Fixing lint

* 🇺🇸 Translate e-mail templates to english (#95)

* Feature/application admin (#86)

* Adding horusec auth base project

* Adding auth handler, with auth types enum and credetials

* Finishing handlers and adding auth controller with factory by type

* Change filter to receive Severity and remove Type

* Adding missing unity tests in devkit

* Adding auth handler tests

* Adding swagger, updating router and configs

* Fixing lint and tests

* Adding horus service authenticate method

* Adding authorize handler

* Updating auth interface

* Adding postgres read

* Adding keycloak service auth and keycloak shared service

* Adding unit test

* Adding horusec roles enum

* Fixing return

* Adding validation to authorize by horus roles

* Renaming packges to horusec

* Fixing some  horusec name errors and unity tests

* Removing nolint and improving code

* Renaming file to horusec

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding horusec service unity testes

* Adding auth controller unity tests and updating mocks

* Adding auth in compose and fixing docs

* Adding auth in compose and fixing docs

* Updating health check

* Fixing lint

* Fixing keycloak unity tests

* Adding unit tests

* Adding unit tests

* Updating middlewares to use auth service

* Fixing auth type

* Fixing tests fmt lint

* Fixing tests fmt lint

* Fixing Security

* Improving code and adding unity tests

* Adding more devkit unity tests

* Adding some unit tests

* Adding middleware service unity tests

* Removing unnecessary test

* Adding horusec auth readme

* Fixing dockerfiles

* Adding validation to actual auth type

* Removing auth type header

* Updating composes

* Removing groups from authorization data

* Updating account, api and analytic readme

* Updating compose with auth url env var

* Updating compose and compose dev

* Fixing unity tests and fmt errors

* Adding application admin role

* Fixing auth pipeline and hashes false positives

* Adding is application admin middleware

* Fixing error that token was static to accept only jwt

* Addding role validation in keycloak

* Fixing token size and swagger error

* Adding route to show config, adding field is_super_admin, adding method to create account default super admin

* Fixing to get account admin data and create with this params

* Removing bearer from keycloak token

* Fixing docs account

* Adding route to get config of horusec-account

* Adding create company with admin application

* Adding api to get account id by token and auth type

* Chaging create account from keycloak to auth

* Updating auth swagger

* Adding validation to create company if user logged is appplication admin

* Fixing lint and tests

* Fixing security step

* Improving keycloak devkit service and fixing tests

* Fixing account unity tests

* Fixing account unity tests in auth

* Adding auth unity tests

* Fixing middleware tests

* Fixing fmt lint

* Fixing fmt error

* Adding Application admin in auth

* Fixing test

* Fixing fmt and lint

* Fixing horusec-config.json

* Adding validation to create default user only auth type horusec

* Fixing README.md in horusec-account

* Improving interface convertion to avoid conversion error

* Fixing fmt lint and units test

* Adding more unit test

* Adding more unit test

* Adding more unit test

* Fixing horusec-config.json

* Adding more unit test

* Fixing tests e2e

* Fixing fmt lint

* Fixing docs auth

* Fixing docs horusec-account

* Fixing security

* Update arquitecture images

* Fixing deploy service

Co-authored-by: Wilian Gabriel <[email protected]>

* Adding return content when create account from keycloak (#98)

* Adding return content when create account from keycloak

* Adding return content when create account from keycloak

* Adding return content when create account from keycloak

* Fixing fmt and lint

* Fixing unit test

* Fixing integration middleware

* Frontend admin application (#100)

* 🗃  Alter the route to fetch config of application and save it in a localStorage

* Added suport to admin application

* [WIP] Feature/improving test (#99)

* Adding TESTBOOK.md correclty

* Adding testbook

* Updating setup external dependences

* Updating setup external dependences

* Updating setup external dependences

* Updating setup external dependences

* Updating setup external dependences

* Fixing horusec-config.json

* Updating setup external dependences

* Update e2e and account pipeline

* Fixing dockerfile.dev

* Fixing dockerfile account

* Change compose internal to run in dev mod

* Update cli pipeline

* Adding new unit test

* Removing old e2e tests and separate correctly e2e tests

* Ignoring up vendor folder in git

* Fixing e2e running

* Fixing compose e2e

* 🛠 Fixing method to verify admin application (#111)

* Frontend environments in compose files (#110)

* 🔑 Added envionments to frontend in compose files

* Adjusting .env.example file with all posible values

* Feature/auth grpc (#112)

* Adding grpc server in auth

* Adding generated proto go files

* Removing unnecessary field in proto

* adding grpc calls to replace http calls in midlewares

* Fixing middleware tests

* Updating compose and grpc config

* Adding certificates options and updating readme

* Updating compose files

* Updating e2e compose file

* Adding auth new port

* Updating e2e compose

* Improving error logs and lint

* Fixing fmt error

* Feature/improving test (#102)

* Adding more e2e tests

* Adding more e2e tests

* Adding more tests e2e

* Fixing fmt lint

* Update test e2e

* Update test e2e

* Fixing workflow e2e

* Fixing e2e running

* Adding validation to restart service with up migratin

* Fixing tests e2e

* Fixing tests e2e

* Fixing e2e

* Adding e2e to check if send messages correctly

* Update testbook

* Fixing gomod

* Starting add keycloak e2e tests

* Adding Request to configure keycloak service

* Adding correctly form to run tests using keycloak server

* Fixing makefile

* Adding tests in keycloak to validate invite user

* Fixing makefile

* Fixing names and docs of e2e

* Removing trash of tests of analysis

* Fixing e2e

* Fixing e2e messages

* Fixing create company

* Fixing create company

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing keycloak compose e2e

* [WIP] Ldap auth service integration (#71)

* Adding horusec auth base project

* Adding auth handler, with auth types enum and credetials

* Finishing handlers and adding auth controller with factory by type

* Change filter to receive Severity and remove Type

* Adding missing unity tests in devkit

* Adding auth handler tests

* Adding swagger, updating router and configs

* Fixing lint and tests

* Adding horus service authenticate method

* Adding authorize handler

* Updating auth interface

* Adding postgres read

* Adding keycloak service auth and keycloak shared service

* Adding unit test

* Adding ldap client dependency

* Adding horusec roles enum

* Adding ldap client config

* Fixing old references

* Fixing return

* Adding validation to authorize by horus roles

* Renaming packges to horusec

* Fixing some  horusec name errors and unity tests

* Updating ldap to implement auth service

* Removing nolint and improving code

* Renaming file to horusec

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding horusec service unity testes

* Adding auth controller unity tests and updating mocks

* Adding auth in compose and fixing docs

* Adding auth in compose and fixing docs

* Updating health check

* Fixing lint

* Fixing keycloak unity tests

* Adding unit tests

* Adding unit tests

* Updating middlewares to use auth service

* Fixing auth type

* Fixing tests fmt lint

* Fixing tests fmt lint

* Fixing Security

* Improving code and adding unity tests

* Adding more devkit unity tests

* Adding some unit tests

* Adding middleware service unity tests

* Removing unnecessary test

* Adding horusec auth readme

* Fixing dockerfiles

* Adding validation to actual auth type

* 🛸 Added fields in create company and repsitory to LDAP roules

* Removing auth type header

* Adding company authz fields

* Adding ldap service in the auth

* Updating composes

* Removing groups from authorization data

* Updating account, api and analytic readme

* WIP ldap authz

* Updating compose with auth url env var

* Updating compose and compose dev

* Adding ldap company authz

* Fixing unity tests and fmt errors

* Adding repository authz

* Adding ldap login logic

* Removing ldap refresh token

* ⚙️ Separe modules of authenticantion, and add splash animation in login screen

* 🛰  Horusec default authenticator

* 🔑 Add auth environment

* Adding ldap authz migration

* Adding ldap service in the handler

* Fixing vendor

* Fixing ldap permision migration

* Removing not null constraint from account password column

* Initialize integration with keycloack

* Adding ldap mock

* Adding ldap service

* Fixing ldap service interface

* Fixing auth pipeline and hashes false positives

* Fixing ldap service

* Improving ldap service

* Improving ldap service

* Improving ldap service

* Improving ldap service package name

* Improving ldap client service

* Fixing lint problems

* Fixing error that token was static to accept only jwt

* Addding role validation in keycloak

* Fixing token size and swagger error

* Adjustin keycloack authentication

* Removing bearer from keycloak token

* Add get user info in keycloack auth and adjusting logout

* Testing ldap service

* Improving fn name

* Adding api to get account id by token and auth type

* Chaging create account from keycloak to auth

* Updating auth swagger

* ⚙️ Alter service to create account from keycloak

* Fixing mail attribute from ldap

* Improving keycloak devkit service and fixing tests

* Fixing account unity tests

* Fixing account unity tests in auth

* Adding auth unity tests

* Fixing middleware tests

* Fixing fmt error

* Adding ldap user uid condition

* Improving interface convertion to avoid conversion error

* 🛠  Adjusting styles, and settings to microfrontend integration and devcraft use

* Merging with the base branch

* Using auth route

* Fixing migration error

* Removing supervisor role from company

* Updating dependencies

* Updating ldap service to fix get groups error

* Fixing some role issues in ldap service

* Adding missing ldap unity tests and improving code

* Adding ldap devkit service unity tests

* Fixing connnect error

* Updating swagger

* Updating vendor

* Adding example ldap env in composes

* Fixing string error in compose

* Fixing lint error in account service

* Removing vendor

* Updating config hashes

* Adding ldap service in compose

* Updating auth compose

* Alter the screnn of login to receiver username

* Updating ldap response

* Removing login horusec native from account to auth

* Fixing fmt errors

* Adding missing unity tests

* Fixing e2e

* Updating security pipeline

* Updating cli pipeline and hashes

* Improving authorize handler

* Added integration with backend for ldap auth

* Fixing companies loading

* Adding ldap memoize

* Adding ldap groups in repository cration and update

* Fixing ldap company update

* Fixing repository creation

* Fixing repository update

* Fixing company list return

* Fixing company form with groups pre filled

* Adding repository autzh fields

* Adding authz fields prefilled

* Fixing repository authz

Company admin is mandatory for authz

* Fixing wrong company role

* Fixing lint

* Adding application admin

* Updating compose ldap host

* Adding isApplicationAdmin attr in ldap authentication

* Adding username in native horus authentication

* Removing unecessary log in manager

* Fixing company creation

* Fixing repository update

Co-authored-by: nathan <[email protected]>
Co-authored-by: Wilian Gabriel <[email protected]>
Co-authored-by: Horusec <[email protected]>
Co-authored-by: lucas.bruno <[email protected]>

* Adding validation to horusec login errors (#118)

* [WIP] Fixing e2e (#115)

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing order for run e2e

* Fixing order for run e2e

* Fixing order for run e2e

* Fixing e2e

* Fixing e2e

* Tests Application admin horusec

* Fixing messages validation

* Fixing messages validation

* Updating keycloak to login by auth

* Adding jwt validation keycloak e2e

* Removing authentication by auth service

* Run duplicate

* rollback

* Comment keycloak in pipeline

Co-authored-by: nathan <[email protected]>

* Fixing repository authz groups (#116)

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing repository authz groups

* Fixing repository tests

* Fixing e2e

* Fixing ldap service tests

* Fixing order for run e2e

* Fixing order for run e2e

* Fixing order for run e2e

* Fixing e2e

* Fixing e2e

* Tests Application admin horusec

* Fixing messages validation

* Fixing messages validation

* Updating keycloak to login by auth

* Adding jwt validation keycloak e2e

* Removing authentication by auth service

* Run duplicate

* rollback

* Testing repository authz groups setted by company

Co-authored-by: Wilian Gabriel <[email protected]>
Co-authored-by: nathan <[email protected]>

* Fixing compose content

* Removing minimum version and adding version recommendation message (#119)

* feature/auth-account-operations (#122)

* Adding account operations in auth

* Removing account operations from account service, improving entities strutuctre

* Fixing error multiple packages

* Fixing error in account middlewares and some minor issues

* Updating composes with new env vars

* Updating compose files and pipeline errors

* Updating auth readme and auth compose

* Updating messsages e2e compose

* Updating auth coverage and fixing e2e messages pipeline

* Updating manager to use auth service

* Adjusting to view field of email to app admin when create new organiz… (#127)

* Adjusting to view field of email to app admin when create new organization (#125)

* Adding validation for user response when ask if run in current directory (#124)

Co-authored-by: Lucas Bruno <[email protected]>

* Improving cli to print error message by line, and removing missing pa… (#126)

* Improving cli to print error message by line, and removing missing packge-lock or yarn-lock as errors, fixing some misspelling

* Fixing unity test

* Feature/semgrep (#128)

* Adding semgrep to horus cli

* Adding semgrep languages, updating semprep formatter

* Adding method to get severity

* Fixing lint errors

* Fixing cli unity tests

* Improving code and adding unity tests

* Changing semgrep config to use docker hub image

* Updating api to accept new languages

* Fixing lint errors

* Adding workdir to generic scan

* feature choice-tool (#132)

* Adding flag to choice if user need ignore tool run in your analysis

* Fixing fmt lint

* Fixing hashes security

* Feature/webhook (#113)

* Adding base webhook service

* Fixing webhook configs and docs

* Adding dispatch http request via broker to destiny saved in database

* Adding dispatch http request via broker to destiny saved in database

* Start crud of webhook

* Start crud of webhook

* Adding handler of webhook

* Fixing swagger

* Fixing lint and handler webhook

* Adding description on struct webhook

* Adding description on struct webhook

* Fixing docs

* Adding repository and calling in controller

* Adding migration script

* Adding controller validations and fixing datatype JSONB in postgresql

* Adding unit tests in webhook

* Finish tests of webhook crud

* Adding deployments and adding tests in horusec-api

* Fixing lint and add health check broker

* Adding helm in auth service

* upgrade coverage webhook

* Fixing horusec-api to not necessary up broker

* Closing body in http response

* Fixing http request to close body in response

* Fixing units tests

* Adding tests of integration of see se dispatch to destiny correctly

* Fixing e2e

* Adding put in cors

* Adding README.md in wehbhoook

* Fixing hash security

* [Frontend] Webhook (#117)

* Item of webhook screen in the side menu, initial structure for the screen

* Added the table to render list of webhooks

* Adding base webhook service

* Adjusting spaces in table of webhooks list

* Fixing webhook configs and docs

* Adding dispatch http request via broker to destiny saved in database

* Adding dispatch http request via broker to destiny saved in database

* Added modal to add new webhook

* Start crud of webhook

* Start crud of webhook

* Adjusting spaces of text input

* Adding handler of webhook

* Fixing swagger

* Fixing lint and handler webhook

* Adding description on struct webhook

* Adding description on struct webhook

* Fixing docs

* Adding repository and calling in controller

* Adding migration script

* Add Webhook interface and adjust method http select in create new webhook

* Adding controller validations and fixing datatype JSONB in postgresql

* Adding unit tests in webhook

* Finish tests of webhook crud

* Adding deployments and adding tests in horusec-api

* Fixing lint and add health check broker

* Adding helm in auth service

* upgrade coverage webhook

* Fixing horusec-api to not necessary up broker

* Closing body in http response

* Fixing http request to close body in response

* Fixing units tests

* Adding tests of integration of see se dispatch to destiny correctly

* Fixing e2e

* Adding put in cors

* Added delete and edit webhook

* Fixing lint

* Adjusting role for webhook screen

* Adding README.md in wehbhoook

Co-authored-by: Wilian Gabriel <[email protected]>
Co-authored-by: Nathan Tavares Nascimento <[email protected]>

* Fixing auth cors (#133)

* Update account username and email (#135)

* Adding update account handler

* Adding update account feature

* Fixing account controller interface

* Fixing account controller mock

* Fixing account update handler

* Fixing lint

* Adding handler test

* Adding updation validate

* Testing update account handler

* Improving update account controller

* Testing update account controller

* Adding vuln as risk accepeted

hash 45aa5c46df5ba51d7e59da826544412352c189a6acf5707f941922181c94f989

* Repository form authz groups (#134)

* Adding repository groups from company

* Adding repository creation groups inital value

* Update pt-br.json (#139)

Fixed typo in text.

* Feature/horusec-csharp (#131)

* Adding base horusec csharp cli

* Adding csharp rules structure

* Fixing security hashes

* Adding horusec csharp cli injetion rules

* Adding others rules

* Adding sql injection linq rule

* Update leaks with set pwd

* Update make file and adding pipeline of horusec-csharp

* Adding password validation

* Adding sql injection rules in csharp cli

* Adding rules of cookies, view state

* Fixing errors

* Adding some cryptography rules to csharp cli

* Fixing total rules csharp

* Adding weak cipher rules

* Adding more rules of csharp

* Fixing test

* Adding more csharp rules

* add NewCsharpRegularDebugBuildEnabled

* add NewCsharpRegularDebugBuildEnabled

* Adding custom errors disabled rule

* Adding rules csharp

* Adding rule vulnerable package reference

* Adding rule jwt signature validation disabled

* Add cors allow origin wildcard rules

* Adding NewCsharpAndFormsAuthenticationCookielessMode

* Adding regular anti forgery token rule

* Adding form validations

* Adding missing authorize attribute rule

* Adding rules of xml in csharp

* Fix test

* Adding more csharp rules

* Adding password lockout disabled rule

* Adding more rules in csharp of cookies and assinatures

* Adding cross site rules

* Weak password rule

* Adding ldap injection filter rule

* Adding more rules in csharp

* Adding more rules in csharp

* Adding more rules in csharp

* Adding ldap injection rules

* Adding more rules in csharp

* Adding csharp in deployments to up version

* Adding csharp in deployments to up version

* Rename test zip to csharp

* Adding horusec csharp cli

* Change language to csharp

* Adding test to check netcore is deprecated

* Updating regular rules

* Adding rule no log sensitive information in console

* Fix conflict

* Fixing error removing old regular expressions

* Update weak rsa key length

* Removing deplicated rule

* Fixing rules of java min 128 bits in key generator

* Adding unit tests in csharp engine

* Fixing fmt lint

* Fixing test

* Fixing test

* Adding readme.md in horusec-csharp

* Update README.md

* Fixing tests

* Merge and update doc

Co-authored-by: Wilian Gabriel <[email protected]>
Co-authored-by: Wilian Gabriel <[email protected]>

* Removing Landing Page (#141)

* Adding eslint dockerfile

* Change name dotnet to csharp (#144)

* WIP adding eslint formatter

* Update version csharp

* WIP cleanup formatter code

* Wip adding eslint formatter docker execution

* Adding analyser eslint formatter

* Fixing eslint configuration

* Adding eslint security rules config

* Improving eslint formatter

* Adding eslint output struct

* Adding eslint results into analysis

* Adding eslint javascript analyse

* Feature/update docs (#140)

* Update composes and check if are go pass in pipeline

* Fixing env wrong

* Update docs

* Fix docs

* Adding estlint image script

* Adding eslint tool in deploy workflow

* Fixing eslint tool name

* Updating ignore tool flag description

* Fixing lint problem

* Fixing eslint file pattern

* Testing eslint formatter

* Testing eslint formatter

* Adding eslint scan in readme

* Fixing code sample length

* Fixing eslint config

* Removing eslint object injection

* Feature/horusec nodejs (#143)

* Adding base of horusec nodejs

* Merge with develop

* Adding Horusec-NodeJS in CLI

* Fixing fmt lint

* Adding initial rules for sql injection, xss, others

* Fixing fmtg

* Adding rules of cripto in nodejs

* Adding some vulnerabilities in nodejs

* Fixing total vuln nodejs

* Adding more rules injection in nodejs

* Adding rules of http-proxy, no log, ip address,  others

* Adding more rules in nodejs

* Fixing fmt lint

* Fixing docs

* Fixing name

* Fixing tests fmt lint

* Adding jsx e tsx

* Fixing sql injection query

* Update no log sensitive information

* Update no log sensitive information

* Fixing total found in nodejs

* Adding docs

* Feature/k8s cli (#148)

* Adding some kubernetes rules

* Adding kubernetes cli

* Updating docs

* Adding horusec kubernetes cli in make file

* Adding kubernetes cli in horusec cli

* Updating go modules

Co-authored-by: Nathan Tavares Nascimento <[email protected]>

* Update deploy-cli-tools.yml

* Update update-image-tool.sh

* Adding docs kubernetes (#149)

* Adding docs kubernetes

* Fixing readme

* Update image nodejs and kubernetes

* Updating analysis cli images

Co-authored-by: nathan <[email protected]>

* Adding eslint in analysis slice

* Fixing eslint config

* Javascritpt eslint security (#146)

* Adding eslint dockerfile

* WIP adding eslint formatter

* WIP cleanup formatter code

* Wip adding eslint formatter docker execution

* Adding analyser eslint formatter

* Fixing eslint configuration

* Adding eslint security rules config

* Improving eslint formatter

* Adding eslint output struct

* Adding eslint results into analysis

* Adding eslint javascript analyse

* Adding estlint image script

* Adding eslint tool in deploy workflow

* Fixing eslint tool name

* Updating ignore tool flag description

* Fixing lint problem

* Fixing eslint file pattern

* Testing eslint formatter

* Testing eslint formatter

* Adding eslint scan in readme

* Fixing code sample length

* Fixing eslint config

* Removing eslint object injection

* Adding eslint in analysis slice

* Fixing eslint config

Co-authored-by: Wilian Gabriel <[email protected]>

* Fixing eslint extensions

* Fixing eslint file paht

* Fixing generics bugs (#150)

* Adding typescript vulnerabilities separated

* Adding validation to not dispatch typescript in js

* Adding node js cli in validation

* Fixing lint error

* Fixing unity test

* Fixing tsx and jsx run in javascript

* Fix fmt

* Fixing versions

* Fixing auth cors

* Fixing log very sensitive in csharp

* Update version of leaks

* Update version of leaks

* Fixing test

* Update analyser to log not existing hash

* Update analyser to log not existing hash

* Fixing version eslint

* Fixing vuln in frontend

* Fixing lint manager

* Fixing horusec-config

* Fix lint

Co-authored-by: nathan <[email protected]>

* Downgrade severity no use localstorage

* Adding files license

* Adding yaml license

* Added INFO severity and add colors of languages (#152)

* Update README.md

* [skip ci] update versioning file

* [skip ci] update versioning file

* [skip ci] update versioning file

* Merge with master

* Adding vulnerabilities tests for horusec-leaks rules (#158)

* Adding vulnerabilities tests for horusec-leaks rules

* Adding rule twitter

* Fixing gcp token

* Fixing development-kit

* Adding project path in file with vulnerability (#156)

* Fix Reset password validation (#160)

* Fix Reset password validation

* Fixing lint

* Fixing tests

* Fixing horusec-config

* Fixing hash

* [Frontend] Webhook improvements (#136)

* Added search bar to webhook screen and option to delete header in add and edit modal

* Added option to copy a existing webhook

* Adjusting text to create new webhook

* Adding validation for get password correctly

* Adding validation for get password correctly

* Bugfix/update account (#166)

* Fixing update password

* Update swagger auth

* Adding stable version to migrate (#167) (#168)

* Updating develop with master (#170)

* Adding stable version to migrate (#167)

* Updating validate email url (#169)

* Squashed commit of the following:

commit 44042db521749a336585430a829c13540de72294
Author: Wilian Gabriel <[email protected]>
Date:   Wed Dec 2 10:20:14 2020 -0300

    Update helm charts (#165)

    * Upgrade environments horusec-auth

    * Update helm values of micro services

    * Update helm values of micro services

    * Update helm values of micro services

    * Update helm values of micro services

    * Update helm account

    * Update helm account

    * Removing license comentary in chart

    * Fixing helm charts

    * Fixing version fixed

    * Fixing charts

    * Fixing environments on values

    * Fixing fmt

    * Fixing databasemigration

    * Fix

commit a29ee719eb7e08d8ad74b5683befb67afb83cf3d
Author: nathannascimentozup <[email protected]>
Date:   Wed Dec 2 10:06:03 2020 -0300

    Adding support for root path horusec-config file (#161)

    * Fixing abs path for horusec-config.json

    * Adding config path flag

    * Adding inputs package

    * Removing uncessary code

    * Removing config flag

commit 1acf85b1e5a9b125a5f8a7c1ad22e2a5f0478efd
Author: nathanmartinszup <[email protected]>
Date:   Tue Dec 1 13:32:51 2020 -0300

    Updating validate email url (#169)

commit 2765a441d5daa66c99bd6272697df7956cd22c24
Author: nathanmartinszup <[email protected]>
Date:   Mon Nov 30 16:23:49 2020 -0300

    Adding stable version to migrate (#167)

* Settings screen (#137)

* Added option in side menu to access the settings screen

* Structure of settings screen

* Add dialog to change informations of account

* Add modal to change password

* Fixing auth service cors

* Added integration with api to update email and username

* Added option to delete account

* Updating auth cors

* Fixing account update

* Fixing account update

* Finalizing delete account flow

* Add service to change password

* Added message for error in same password when change it

* Fixing auth

* Update logic to update user and pass

* Fixing patch

* Add rule to view te screen something when authType is a default

* Fixing coverage auth

* Fixing fmt lint

Co-authored-by: Nathan Tavares Nascimento <[email protected]>
Co-authored-by: nathan <[email protected]>
Co-authored-by: Wilian Gabriel <[email protected]>

* Merge with master

* Feature/flawfinder (#171)

* Adding flawfinder c analysis tool

* Adding formatter for flawfinder

* Fixing commit authors in flawfinder

* Adding license

* Updating docs and adding unity tests

* Adding c++ in doc

* Fixing auth grpc

Co-authored-by: Wilian Gabriel <[email protected]>

* Update README.md

* Added rules when the the option of broker service is disabled in backend (#175)

Co-authored-by: Wilian Gabriel <[email protected]>

* Feature/phpcs (#177)

* Adding flawfinder c analysis tool

* Adding formatter for flawfinder

* Fixing commit authors in flawfinder

* Adding license

* Updating docs and adding unity tests

* Adding c++ in doc

* Adding phpcs dockerfile

* Fixing auth grpc

* Adding php phpcs security tool

* Adding missing unity tests and fixing lint

* =Fixing git blame and updating docs

* Fixing lint error

* Fixing readme

Co-authored-by: Wilian Gabriel <[email protected]>

* Bugfix/improving-grpc-logs (#178)

* Adding log for received grpc requests

* Improving midlewares errors

* Fixing error when load the donut chart with empty data (#179)

* Add headers dynamic to send on request (#182)

* Add headers dynamic to send on request

* Adding unit test

* Fix fmt lint

* Update doc

* Update doc

* Fix test

* Updating Authorization header to X-Horusec-Authorization (#183)

* Updating Authorization header to X-Horusec-Authorization

* Updating token in refresh function

* Fixing pipeline

* Adjusting colors of svg icons and add new webhook icon (#184)

* Fixing clear inputs when create new webhook (#185)

* [skip ci] update versioning file

* Feature/horusec cli image (#186)

* Updating horusec cli dockerfile

* Adding flag to project path on host when clicking on docker image

* Updating workdir with the new languages

* Fixing lint

* Fixing project path in print results

* Adding git in docker cli image

* Fixing filepaths (#188)

* Fixing filepaths

* Fixing audit vuln

* Fixing pipeline

* Updating docs

* Updating code build docs

* Develop (#181) (#191)

* feature/automatic-csproj (#23)

* adding dynamic detection of csproj, yarn.lock, package-lock.json and requirements.txt

* file path by ext unity tests

* Template email of organization invited (#22)

* e-mail Added the template of e-mail to a user is invited to the organization

* Fixing go lint

* 🔒 The screen dashboard of organization is visible something the admin users (#26)

* Organizing i18n values in frontend (#30)

* Rewrite i18n values for external pages and dashsboard screen

* Adjusting i18 values in repositories screen

* 🛠️  Adjusting redirect routes when the call is external of manager (#19)

* Hotfix/fixing redirect and output bigger (#21)

* Fixing redirect in email template reset-password

* Fixing code output when exists many content and bad read

* Fixing fmt and set total output to down

* Hotfix/unique names (#28)

* Adding unique names migration

* Adding validations to unique names and unity tests

* Fixing swagger in horusec-analytics (#27)

* Add i18n values to enUS

Co-authored-by: Wilian Gabriel <[email protected]>
Co-authored-by: nathanmartinszup <[email protected]>

* Removing fields type, vulnerableBellow and version from Vulnerability (#24)

* Removing fields type, vulnerableBellow and version from Vulnerability

* Fixing e2e and unit testss

* Change pipeline to use docker-compose

* Fixing docker-compose.test

* Fixing deployment

* Fixing compose

* Merge master into develop (#36)

* 🛠️  Adjusting redirect routes when the call is external of manager (#19)

* Hotfix/fixing redirect and output bigger (#21)

* Fixing redirect in email template reset-password

* Fixing code output when exists many content and bad read

* Fixing fmt and set total output to down

* Hotfix/unique names (#28)

* Adding unique names migration

* Adding validations to unique names and unity tests

* Fixing swagger in horusec-analytics (#27)

* Hotfix/change images generate token (#31)

* Change images to generate token

* Adding gif usage horusec

* Adding gif usage horusec

Co-authored-by: Lucas Bruno <[email protected]>
Co-authored-by: nathanmartinszup <[email protected]>

* Adding company role in get all companies (#33)

* Adding company role in get all companies

* Adding unity tests

* Tokens of organization (#32)

* 🔑 Handler tokens of organization

* 🛡️  Added rules in manager organizations

* Not found screen (#34)

* 👷 Initial structure to not found page

* 👌 Finalizing page of not found

* 🔙 Added option to back to organization screen when in home page

* 🔨 Fixing version in package json

* Fixing error in unique company name not necessary, and removings wrong constraints in database (#38)

* [skip ci] update versioning file

* Added component of pagination (#47)

* CLI docker image (#25)

* Adding cli dockerfile

* Adding horusec as entrypoint

* Removing docker from image

* Adding docker-entrypoint

* Using docker dind

* Downgrade docker dind

* Using entrypoint

* Renaming entrypoint to horusec-cli

* Updating documentation

* Adding license

* Updating vendor

Co-authored-by: Horusec <[email protected]>

* 💅 Adjusting button dialog styles, scrollbar and select component (#48)

* Adjusting the texts in portugueses (#52)

* ✅ Added option to success message from flash message component and added in all handlers (#53)

* Feature/create repository cli (#55)

* Create repository by cli flag, update list repository to list all repositories to company admin

* Adding tests and validation to list all repositories of company if i am admin

* Removing duplicated code to list repositories to company admin

* Removing unnecessary unity test

* Fixing unity tests and adding middleware to company admin

* Adding missing test

* Updating analytic routes by repository to accept admins of company

* Fixing broken e2e tests

Co-authored-by: Wilian Gabriel <[email protected]>

* Frontend false positive (#54)

* Initial strucute for false positive screen

* Finished false posite screen and add supervisor role

* Implementing false-positive and risk accept (#35)

* Change struct of analysis

* Fixing fmt lint entity and create migration files

* Adding get all dto and method

* Fixing migration

* Adding base management repository

* Adding get all vuln management data

* Adding management repository unity tests

* adding management controller get all

* adding get all management data

* adding management handler unity tests

* Adding update method in repository

* Adding update method in controller

* adding management handler put

* Adding management handler unity tests

* Fixing create analysis

* Adding app sec role

* Fixing list vuln management error where vulns are duplicating, fixing swagger errors

* Removing unnecessary nolint and improving code

* Fixing to send analysis correctly to horusec-api

* Adding separated api to update status and type

* Adding new vulnerability status and type enums

* Fixing lint

* Fixing lint errors

* Removing status and updating apis

* Updating migration

* Fixing output to show vulnerability to fix

* Fixing lint and project errors

* Fixing management unit tests

* Fixing errors in list vulns

* Fixing some type errors

* Updating output to print false positive and risk accept

* Start fixing tests

* Fixing tests

* Fixing vulnerabilities unity tests

* Fixing analytic queries

* Fixing tests

* Fixing analytic repositoty unit tests

* Adding tests on cli

* Adding more content

* Fixing hash generator

* Fixing hash generator

* Fixing vulnerability test

* Adding devkit entities and types units tests

* Adding Unit tests

* Adding unit tests

* Fixing license

* Adding analysis tests

* Fixing lint

* fixing e2e tests

* Updating e2e tests

* Fixing tests in repository

* FIxing fmt lint

* Parse horusec analysis response correctly

* Fixing lint

* Fixing errors in vulns details

* Fixing e2e test

* Updating api cors

* Updating cors

Co-authored-by: nathan <[email protected]>
Co-authored-by: lucas.bruno <[email protected]>

* Fixing wrong text in output

* Bugfix/false positive (#58)

* Fixing supervisor middleware validation to company admins

* Fixing load data in vulnerabilities table

* Fixing false positive in CLI

* Updating swagger

* Fixing docs

* Fixing lint

Co-authored-by: lucas.bruno <[email protected]>
Co-authored-by: Wilian Gabriel <[email protected]>

* Fixing regex d34b3ba5-b988-4a0f-9344-467274cd98be (#59)

* Removing deprecated manager (#60)

* Fixing security pipeline in horusec (#61)

* Fixing security pipeline in horusec

* Fixing security pipeline in horusec

* Fixing security pipeline in horusec

* Fixing security pipeline in horusec

* Fixing readme cli

* Fixing readme cli

* Update README.md

* Update README.md

* Change filter to receive Severity and remove Type (#64)

* Feature/improving false positive (#66)

* Adding order by severity and type

* Adding filter by type

* Fixing lint errors and adding unity tests

* Fixing order by error

* Updating swagger

* Fixing fmt errors

* [Frontend] Improvements false positive (#67)

* Added new filter in false positive screen

* Added success messages

* Added tag with color in severity

* List vulnerabilities in management screen to repository members (#68)

* [Frontend] - Improvements false positive (#69)

* Added new filter in false positive screen

* Added success messages

* Added tag with color in severity

* Removing supervisor role in company

* Added permission to handler repository

* Migration deploy hook (#65)

* Adding migration dockerfile

* Improving migration dockerfile

* Using env in migration

* Adding migration template

* Fixing migration template

* Adding migration image script

* Updating helm hook

* Fixing mingration version

* Fixing  service image script builder

Co-authored-by: Horusec <[email protected]>

* Adding api to delete account and permissions (#85)

* Adding api to delete account and permissions

* Adding license in docs

* Adding jwt auth middleware in delete account

* Feature/horusec auth (#62)

* Adding horusec auth base project

* Adding auth handler, with auth types enum and credetials

* Finishing handlers and adding auth controller with factory by type

* Change filter to receive Severity and remove Type

* Adding missing unity tests in devkit

* Adding auth handler tests

* Adding swagger, updating router and configs

* Fixing lint and tests

* Adding horus service authenticate method

* Adding authorize handler

* Updating auth interface

* Adding postgres read

* Adding keycloak service auth and keycloak shared service

* Adding unit test

* Adding horusec roles enum

* Fixing return

* Adding validation to authorize by horus roles

* Renaming packges to horusec

* Fixing some  horusec name errors and unity tests

* Removing nolint and improving code

* Renaming file to horusec

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding horusec service unity testes

* Adding auth controller unity tests and updating mocks

* Adding auth in compose and fixing docs

* Adding auth in compose and fixing docs

* Updating health check

* Fixing lint

* Fixing keycloak unity tests

* Adding unit tests

* Adding unit tests

* Updating middlewares to use auth service

* Fixing auth type

* Fixing tests fmt lint

* Fixing tests fmt lint

* Fixing Security

* Improving code and adding unity tests

* Adding more devkit unity tests

* Adding some unit tests

* Adding middleware service unity tests

* Removing unnecessary test

* Adding horusec auth readme

* Fixing dockerfiles

* Adding validation to actual auth type

* Removing auth type header

* Updating composes

* Removing groups from authorization data

* Updating account, api and analytic readme

* Updating compose with auth url env var

* Updating compose and compose dev

* Fixing unity tests and fmt errors

* Fixing auth pipeline and hashes false positives

* Fixing error that token was static to accept only jwt

* Addding role validation in keycloak

* Fixing token size and swagger error

* Removing bearer from keycloak token

* Adding api to get account id by token and auth type

* Chaging create account from keycloak to auth

* Updating auth swagger

* Improving keycloak devkit service and fixing tests

* Fixing account unity tests

* Fixing account unity tests in auth

* Adding auth unity tests

* Fixing middleware tests

* Fixing fmt error

* Improving interface convertion to avoid conversion error

Co-authored-by: Wilian Gabriel <[email protected]>

* Frontend - Many authentication types (#77)

* 🛸 Added fields in create company and repsitory to LDAP roules

* ⚙️ Separe modules of authenticantion, and add splash animation in login screen

* 🛰  Horusec default authenticator

* 🔑 Add auth environment

* Initialize integration with keycloack

* Adjustin keycloack authentication

* Add get user info in keycloack auth and adjusting logout

* ⚙️ Alter service to create account from keycloak

* 🛠  Adjusting styles, and settings to microfrontend integration and devcraft use

* Fixing keycloack config when in other auth type, and adjusting function types

* Fixing lint

* 🇺🇸 Translate e-mail templates to english (#95)

* Feature/application admin (#86)

* Adding horusec auth base project

* Adding auth handler, with auth types enum and credetials

* Finishing handlers and adding auth controller with factory by type

* Change filter to receive Severity and remove Type

* Adding missing unity tests in devkit

* Adding auth handler tests

* Adding swagger, updating router and configs

* Fixing lint and tests

* Adding horus service authenticate method

* Adding authorize handler

* Updating auth interface

* Adding postgres read

* Adding keycloak service auth and keycloak shared service

* Adding unit test

* Adding horusec roles enum

* Fixing return

* Adding validation to authorize by horus roles

* Renaming packges to horusec

* Fixing some  horusec name errors and unity tests

* Removing nolint and improving code

* Renaming file to horusec

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding horusec service unity testes

* Adding auth controller unity tests and updating mocks

* Adding auth in compose and fixing docs

* Adding auth in compose and fixing docs

* Updating health check

* Fixing lint

* Fixing keycloak unity tests

* Adding unit tests

* Adding unit tests

* Updating middlewares to use auth service

* Fixing auth type

* Fixing tests fmt lint

* Fixing tests fmt lint

* Fixing Security

* Improving code and adding unity tests

* Adding more devkit unity tests

* Adding some unit tests

* Adding middleware service unity tests

* Removing unnecessary test

* Adding horusec auth readme

* Fixing dockerfiles

* Adding validation to actual auth type

* Removing auth type header

* Updating composes

* Removing groups from authorization data

* Updating account, api and analytic readme

* Updating compose with auth url env var

* Updating compose and compose dev

* Fixing unity tests and fmt errors

* Adding application admin role

* Fixing auth pipeline and hashes false positives

* Adding is application admin middleware

* Fixing error that token was static to accept only jwt

* Addding role validation in keycloak

* Fixing token size and swagger error

* Adding route to show config, adding field is_super_admin, adding method to create account default super admin

* Fixing to get account admin data and create with this params

* Removing bearer from keycloak token

* Fixing docs account

* Adding route to get config of horusec-account

* Adding create company with admin application

* Adding api to get account id by token and auth type

* Chaging create account from keycloak to auth

* Updating auth swagger

* Adding validation to create company if user logged is appplication admin

* Fixing lint and tests

* Fixing security step

* Improving keycloak devkit service and fixing tests

* Fixing account unity tests

* Fixing account unity tests in auth

* Adding auth unity tests

* Fixing middleware tests

* Fixing fmt lint

* Fixing fmt error

* Adding Application admin in auth

* Fixing test

* Fixing fmt and lint

* Fixing horusec-config.json

* Adding validation to create default user only auth type horusec

* Fixing README.md in horusec-account

* Improving interface convertion to avoid conversion error

* Fixing fmt lint and units test

* Adding more unit test

* Adding more unit test

* Adding more unit test

* Fixing horusec-config.json

* Adding more unit test

* Fixing tests e2e

* Fixing fmt lint

* Fixing docs auth

* Fixing docs horusec-account

* Fixing security

* Update arquitecture images

* Fixing deploy service

Co-authored-by: Wilian Gabriel <[email protected]>

* Adding return content when create account from keycloak (#98)

* Adding return content when create account from keycloak

* Adding return content when create account from keycloak

* Adding return content when create account from keycloak

* Fixing fmt and lint

* Fixing unit test

* Fixing integration middleware

* Frontend admin application (#100)

* 🗃  Alter the route to fetch config of application and save it in a localStorage

* Added suport to admin application

* [WIP] Feature/improving test (#99)

* Adding TESTBOOK.md correclty

* Adding testbook

* Updating setup external dependences

* Updating setup external dependences

* Updating setup external dependences

* Updating setup external dependences

* Updating setup external dependences

* Fixing horusec-config.json

* Updating setup external dependences

* Update e2e and account pipeline

* Fixing dockerfile.dev

* Fixing dockerfile account

* Change compose internal to run in dev mod

* Update cli pipeline

* Adding new unit test

* Removing old e2e tests and separate correctly e2e tests

* Ignoring up vendor folder in git

* Fixing e2e running

* Fixing compose e2e

* 🛠 Fixing method to verify admin application (#111)

* Frontend environments in compose files (#110)

* 🔑 Added envionments to frontend in compose files

* Adjusting .env.example file with all posible values

* Feature/auth grpc (#112)

* Adding grpc server in auth

* Adding generated proto go files

* Removing unnecessary field in proto

* adding grpc calls to replace http calls in midlewares

* Fixing middleware tests

* Updating compose and grpc config

* Adding certificates options and updating readme

* Updating compose files

* Updating e2e compose file

* Adding auth new port

* Updating e2e compose

* Improving error logs and lint

* Fixing fmt error

* Feature/improving test (#102)

* Adding more e2e tests

* Adding more e2e tests

* Adding more tests e2e

* Fixing fmt lint

* Update test e2e

* Update test e2e

* Fixing workflow e2e

* Fixing e2e running

* Adding validation to restart service with up migratin

* Fixing tests e2e

* Fixing tests e2e

* Fixing e2e

* Adding e2e to check if send messages correctly

* Update testbook

* Fixing gomod

* Starting add keycloak e2e tests

* Adding Request to configure keycloak service

* Adding correctly form to run tests using keycloak server

* Fixing makefile

* Adding tests in keycloak to validate invite user

* Fixing makefile

* Fixing names and docs of e2e

* Removing trash of tests of analysis

* Fixing e2e

* Fixing e2e messages

* Fixing create company

* Fixing create company

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing e2e

* Fixing keycloak compose e2e

* [WIP] Ldap auth service integration (#71)

* Adding horusec auth base project

* Adding auth handler, with auth types enum and credetials

* Finishing handlers and adding auth controller with factory by type

* Change filter to receive Severity and remove Type

* Adding missing unity tests in devkit

* Adding auth handler tests

* Adding swagger, updating router and configs

* Fixing lint and tests

* Adding horus service authenticate method

* Adding authorize handler

* Updating auth interface

* Adding postgres read

* Adding keycloak service auth and keycloak shared service

* Adding unit test

* Adding ldap client dependency

* Adding horusec roles enum

* Adding ldap client config

* Fixing old references

* Fixing return

* Adding validation to authorize by horus roles

* Renaming packges to horusec

* Fixing some  horusec name errors and unity tests

* Updating ldap to implement auth service

* Removing nolint and improving code

* Renaming file to horusec

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding create user from keycloak token

* Adding horusec service unity testes

* Adding auth controller unity tests and updating mocks

* Adding auth in compose and fixing docs

* Adding auth in compose and fixing docs

* Updating health check

* Fixing lint

* Fixing keycloak unity tests

* Adding unit tests

* Adding unit tests

* Updating middlewares to use auth service

* Fixing auth type

* Fixing tests fmt lint

* Fixing tests fmt lint

* Fixing Security

* Improving code and adding unity tests

* Adding more devkit unity tests

* Adding some unit tests

* Adding middleware service unity tests

* Removing unnecessary test

* Adding horusec auth readme

* Fixing dockerfiles

* Adding validation to actual auth type

* 🛸 Added fields in create company and repsitory to LDAP roules

* Removing auth type header

* Adding company authz fields

* Adding ldap service in the auth

* Updating composes

* Removing groups from authorization data

* Updating account, api and analytic readme

* WIP ldap authz

* Updating compose with auth url env var

* Updating compose and compose dev

* Adding ldap company authz

* Fixing unity tests and fmt errors

* Adding repository authz

* Adding ldap login logic

* Removing ldap refresh token

* ⚙️ Separe modules of authenticantion, and add splash animation in login screen

* 🛰  Horusec default authenticator

* 🔑 Add aut…
  • Loading branch information
9 people authored Dec 14, 2020
1 parent 2a98dc4 commit 215b9ea
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 82 deletions.
12 changes: 11 additions & 1 deletion development-kit/pkg/entities/analyser/python/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

package python

import "github.com/ZupIT/horusec/development-kit/pkg/enums/severity"
import (
"github.com/ZupIT/horusec/development-kit/pkg/enums/severity"
)

type BanditOutput struct {
Results []BanditResult `json:"results"`
Expand Down Expand Up @@ -44,3 +46,11 @@ type SafetyIssues struct {
Description string `json:"description"`
ID string `json:"id"`
}

func (b *BanditResult) GetFile() string {
if b.FileName != "" && b.FileName[0:2] == "./" {
return b.FileName[2:]
}

return b.FileName
}
2 changes: 1 addition & 1 deletion horusec-cli/.semver.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
alpha: 0
beta: 0
rc: 0
release: v1.6.0
release: v1.6.1
85 changes: 54 additions & 31 deletions horusec-cli/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions horusec-cli/cmd/horusec/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,7 @@ func (s *Start) loadFlags(cmd *cobra.Command) {
cmd.PersistentFlags().
StringVarP(&s.configs.ToolsToIgnore, "tools-ignore", "T", s.configs.GetToolsToIgnore(),
"Tools to ignore in the analysis. Available are: GoSec,SecurityCodeScan,Brakeman,Safety,Bandit,NpmAudit,YarnAudit,SpotBugs,HorusecKotlin,HorusecJava,HorusecLeaks,GitLeaks,TfSec,Semgrep,HorusecCsharp,HorusecNodeJS,HorusecKubernetes,Eslint,PhpCS,Flawfinder. Example: -T=\"GoSec, Brakeman\"")
cmd.PersistentFlags().
StringVarP(&s.configs.ContainerBindProjectPath, "container-bind-project-path", "P", s.configs.GetContainerBindProjectPath(),
"Used to pass project path in host when running horusec cli inside a container.")
}
1 change: 1 addition & 0 deletions horusec-cli/config/.example-horusec-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"horusecCliFalsePositiveHashes": "hash1, hash2",
"horusecCliRiskAcceptHashes": "hash3, hash4",
"horusecCliToolsToIgnore": "GoSec",
"horusecCliContainerBindProjectPath": "test",
"horusecCliHeaders": {
"X-Headers": "some-other-value"
}
Expand Down
19 changes: 17 additions & 2 deletions horusec-cli/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ package config

import (
"encoding/json"
"github.com/ZupIT/horusec/development-kit/pkg/utils/logger"
"github.com/ZupIT/horusec/horusec-cli/internal/helpers/messages"
"os"
"strings"

"github.com/ZupIT/horusec/development-kit/pkg/utils/logger"
"github.com/ZupIT/horusec/horusec-cli/internal/helpers/messages"

"github.com/iancoleman/strcase"

"github.com/ZupIT/horusec/development-kit/pkg/utils/env"
Expand Down Expand Up @@ -155,6 +156,9 @@ const (
// Used send others headers on request to send in horusec-api
// By default is empty
EnvHeaders = "HORUSEC_CLI_HEADERS"
// Used to pass project path in host when running horusec cli inside a container
// By default is empty
EnvContainerBindProjectPath = "HORUSEC_CLI_CONTAINER_BIND_PROJECT_PATH"
)

type Config struct {
Expand Down Expand Up @@ -182,6 +186,7 @@ type Config struct {
FalsePositiveHashes string
RiskAcceptHashes string
ToolsToIgnore string
ContainerBindProjectPath string
}

//nolint
Expand Down Expand Up @@ -211,6 +216,7 @@ func (c *Config) SetConfigsFromViper() {
c.SetRiskAcceptHashes(viper.GetString(c.toLowerCamel(EnvRiskAcceptHashes)))
c.SetToolsToIgnore(viper.GetString(c.toLowerCamel(EnvToolsToIgnore)))
c.SetHeaders(viper.GetStringMapString(c.toLowerCamel(EnvHeaders)))
c.SetContainerBindProjectPath(viper.GetString(c.toLowerCamel(EnvContainerBindProjectPath)))
}

//nolint
Expand Down Expand Up @@ -238,6 +244,7 @@ func (c *Config) SetConfigsFromEnvironments() {
c.SetRiskAcceptHashes(env.GetEnvOrDefault(EnvRiskAcceptHashes, c.RiskAcceptHashes))
c.SetToolsToIgnore(env.GetEnvOrDefault(EnvToolsToIgnore, c.ToolsToIgnore))
c.SetHeaders(env.GetEnvOrDefault(EnvHeaders, c.Headers))
c.SetContainerBindProjectPath(env.GetEnvOrDefault(EnvContainerBindProjectPath, c.ContainerBindProjectPath))
}

func (c *Config) GetHorusecAPIUri() string {
Expand Down Expand Up @@ -485,3 +492,11 @@ func (c *Config) SetHeaders(headers interface{}) {
}
}
}

func (c *Config) GetContainerBindProjectPath() string {
return c.ContainerBindProjectPath
}

func (c *Config) SetContainerBindProjectPath(containerBindProjectPath string) {
c.ContainerBindProjectPath = containerBindProjectPath
}
7 changes: 7 additions & 0 deletions horusec-cli/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func TestNewHorusecConfig(t *testing.T) {
assert.Equal(t, 0, len(configs.GetFalsePositiveHashesList()))
assert.Equal(t, 0, len(configs.GetRiskAcceptHashesList()))
assert.Equal(t, "", configs.Headers)
assert.Equal(t, "", configs.ContainerBindProjectPath)
})
t.Run("Should change horusec config and return your new values", func(t *testing.T) {
configs := &Config{}
Expand All @@ -81,6 +82,7 @@ func TestNewHorusecConfig(t *testing.T) {
configs.SetRiskAcceptHashes("987654321")
configs.SetToolsToIgnore("HorusecLeaks")
configs.SetHeaders(map[string]string{"header1": "value1"})
configs.SetContainerBindProjectPath("test")
assert.NotEqual(t, configs.GetHorusecAPIUri(), "http://0.0.0.0:8000")
assert.NotEqual(t, configs.GetTimeoutInSecondsRequest(), int64(300))
assert.NotEqual(t, configs.GetTimeoutInSecondsAnalysis(), int64(600))
Expand All @@ -103,6 +105,7 @@ func TestNewHorusecConfig(t *testing.T) {
assert.NotEqual(t, configs.GetToolsToIgnore(), "")
assert.NotNil(t, configs.GetWorkDir())
assert.NotEmpty(t, configs.GetHeaders())
assert.NotEmpty(t, configs.GetContainerBindProjectPath())
})
t.Run("Should return horusec config using viper file", func(t *testing.T) {
path, err := os.Getwd()
Expand Down Expand Up @@ -134,6 +137,7 @@ func TestNewHorusecConfig(t *testing.T) {
assert.Equal(t, configs.FalsePositiveHashes, "hash1, hash2")
assert.Equal(t, configs.RiskAcceptHashes, "hash3, hash4")
assert.Equal(t, configs.ToolsToIgnore, "GoSec")
assert.Equal(t, configs.ContainerBindProjectPath, "test")
})
t.Run("Should return horusec config using viper file and override by environment", func(t *testing.T) {
authorization := uuid.New().String()
Expand Down Expand Up @@ -164,6 +168,7 @@ func TestNewHorusecConfig(t *testing.T) {
assert.NoError(t, os.Setenv(EnvFalsePositiveHashes, "hash1, hash2"))
assert.NoError(t, os.Setenv(EnvRiskAcceptHashes, "hash3, hash4"))
assert.NoError(t, os.Setenv(EnvToolsToIgnore, "TfSec"))
assert.NoError(t, os.Setenv(EnvContainerBindProjectPath, "test"))
headersBytes, err := json.Marshal(map[string]string{"X-other-header": "some-value"})
assert.NoError(t, err)
assert.NoError(t, os.Setenv(EnvHeaders, string(headersBytes)))
Expand All @@ -190,6 +195,7 @@ func TestNewHorusecConfig(t *testing.T) {
assert.Equal(t, 2, len(configs.GetRiskAcceptHashesList()))
assert.Equal(t, "TfSec", configs.GetToolsToIgnore())
assert.Equal(t, map[string]string{"X-other-header": "some-value"}, configs.GetHeaders())
assert.Equal(t, "test", configs.GetContainerBindProjectPath())
})
}

Expand Down Expand Up @@ -217,5 +223,6 @@ func TestToLowerCamel(t *testing.T) {
assert.Equal(t, "horusecCliRiskAcceptHashes", configs.toLowerCamel(EnvRiskAcceptHashes))
assert.Equal(t, "horusecCliToolsToIgnore", configs.toLowerCamel(EnvToolsToIgnore))
assert.Equal(t, "horusecCliHeaders", configs.toLowerCamel(EnvHeaders))
assert.Equal(t, "horusecCliContainerBindProjectPath", configs.toLowerCamel(EnvContainerBindProjectPath))
})
}
8 changes: 3 additions & 5 deletions horusec-cli/deployments/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ RUN go get -t -v -d ./...

RUN env GOOS=linux GOARCH=amd64 go build -o /bin/horusec ./horusec-cli/cmd/horusec/main.go

FROM docker:19-dind
FROM docker

RUN apk add git

COPY --from=builder /bin/horusec /usr/local/bin
RUN chmod +x /usr/local/bin/horusec

COPY --from=builder /horusec/horusec-cli/deployments/horusec-cli.sh /usr/local/bin
RUN chmod +x /usr/local/bin/horusec-cli.sh

ENTRYPOINT [ "horusec-cli.sh" ]
CMD [ "sh" ]
1 change: 1 addition & 0 deletions horusec-cli/deployments/all-version-cli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ v1-4-1
v1-4-2
v1-5-0
v1-6-0
v1-6-1
19 changes: 0 additions & 19 deletions horusec-cli/deployments/horusec-cli.sh

This file was deleted.

2 changes: 1 addition & 1 deletion horusec-cli/deployments/version-cli-latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1-6-0
v1-6-1
13 changes: 11 additions & 2 deletions horusec-cli/internal/controllers/printresults/print_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/ZupIT/horusec/development-kit/pkg/enums/horusec"
"os"
"path/filepath"
"strings"

"github.com/ZupIT/horusec/development-kit/pkg/enums/horusec"

"github.com/ZupIT/horusec/development-kit/pkg/enums/cli"
"github.com/ZupIT/horusec/horusec-cli/config"
"github.com/ZupIT/horusec/horusec-cli/internal/helpers/messages"
Expand Down Expand Up @@ -238,7 +239,7 @@ func (pr *PrintResults) printTextOutputVulnerabilityData(vulnerability *horusecE
fmt.Println(fmt.Sprintf("Column: %s", vulnerability.Column))
fmt.Println(fmt.Sprintf("SecurityTool: %s", vulnerability.SecurityTool))
fmt.Println(fmt.Sprintf("Confidence: %s", vulnerability.Confidence))
fmt.Println(fmt.Sprintf("File: %s/%s", pr.configs.GetProjectPath(), vulnerability.File))
fmt.Println(fmt.Sprintf("File: %s/%s", pr.getProjectPath(), vulnerability.File))
fmt.Println(fmt.Sprintf("Code: %s", vulnerability.Code))
fmt.Println(fmt.Sprintf("Details: %s", vulnerability.Details))
fmt.Println(fmt.Sprintf("Type: %s", vulnerability.Type))
Expand Down Expand Up @@ -313,3 +314,11 @@ func (pr *PrintResults) logSeparator(isToShow bool) {
fmt.Println(fmt.Sprintf("\n==================================================================================\n"))
}
}

func (pr *PrintResults) getProjectPath() string {
if pr.configs.GetContainerBindProjectPath() != "" {
return pr.configs.GetContainerBindProjectPath()
}

return pr.configs.GetProjectPath()
}
9 changes: 8 additions & 1 deletion horusec-cli/internal/entities/workdir/workdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ type WorkDir struct {
JavaScript []string `json:"javaScript"`
Leaks []string `json:"leaks"`
HCL []string `json:"hcl"`
PHP []string `json:"php"`
C []string `json:"c"`
Yaml []string `json:"yaml"`
Generic []string `json:"generic"`
}

Expand All @@ -58,8 +61,9 @@ func (w *WorkDir) Type() string {
return ""
}

//nolint
func (w *WorkDir) Map() map[languages.Language][]string {
cSharp := []string{}
var cSharp []string
cSharp = append(cSharp, w.NetCore...)
cSharp = append(cSharp, w.CSharp...)
return map[languages.Language][]string{
Expand All @@ -73,6 +77,9 @@ func (w *WorkDir) Map() map[languages.Language][]string {
languages.Leaks: w.Leaks,
languages.HCL: w.HCL,
languages.Generic: w.Generic,
languages.PHP: w.PHP,
languages.C: w.C,
languages.Yaml: w.Yaml,
}
}

Expand Down
9 changes: 7 additions & 2 deletions horusec-cli/internal/services/docker/docker_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,13 @@ func (d *API) DeleteContainersFromAPI() {
}
}

func (d *API) getSourceFolder() string {
path := fmt.Sprintf("%s/.horusec/%s", d.config.ProjectPath, d.analysisID.String())
func (d *API) getSourceFolder() (path string) {
if d.config.GetContainerBindProjectPath() != "" {
path = fmt.Sprintf("%s/.horusec/%s", d.config.ContainerBindProjectPath, d.analysisID.String())
} else {
path = fmt.Sprintf("%s/.horusec/%s", d.config.ProjectPath, d.analysisID.String())
}

separator := path[1:2]
if separator == ":" {
return d.getSourceFolderFromWindows(path)
Expand Down
10 changes: 2 additions & 8 deletions horusec-cli/internal/services/formatters/csharp/scs/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package scs

import (
"encoding/json"
"fmt"
vulnhash "github.com/ZupIT/horusec/development-kit/pkg/utils/vuln_hash"
"strings"

Expand Down Expand Up @@ -106,7 +105,7 @@ func (f *Formatter) setVulnerabilitySeverityData(output dotnet.Output) *horusec.
data.Details = f.removeCsprojPathFromDetails(output.IssueText)
data.Line = output.GetLine()
data.Column = output.GetColumn()
data.File = output.GetFilename()
data.File = f.GetFilepathFromFilename(output.GetFilename())

// Set data.VulnHash value
data = vulnhash.Bind(data)
Expand All @@ -115,7 +114,7 @@ func (f *Formatter) setVulnerabilitySeverityData(output dotnet.Output) *horusec.
}

func (f *Formatter) setCommitAuthor(vulnerability *horusec.Vulnerability) *horusec.Vulnerability {
commitAuthor := f.GetCommitAuthor(vulnerability.Line, f.getFilePathFromPackageName(vulnerability.File))
commitAuthor := f.GetCommitAuthor(vulnerability.Line, vulnerability.File)

vulnerability.CommitAuthor = commitAuthor.Author
vulnerability.CommitHash = commitAuthor.CommitHash
Expand All @@ -141,11 +140,6 @@ func (f *Formatter) appendVulnerabilities(vulnerability *horusec.Vulnerability)
})
}

func (f *Formatter) getFilePathFromPackageName(filePath string) string {
return fileUtil.GetPathIntoFilename(filePath,
fmt.Sprintf("%s/.horusec/%s/", f.GetConfigProjectPath(), f.GetAnalysisID()))
}

func (f *Formatter) getConfigData(projectSubPath string) *dockerEntities.AnalysisData {
return &dockerEntities.AnalysisData{
Image: ImageName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (f *Formatter) setCommitAuthor(vulnerability *horusec.Vulnerability) *horus

func (f *Formatter) getDefaultVulnerabilitySeverity() *horusec.Vulnerability {
vulnerabilitySeverity := &horusec.Vulnerability{}
vulnerabilitySeverity.File = "package-lock.json"
vulnerabilitySeverity.File = f.GetFilepathFromFilename("package-lock.json")
vulnerabilitySeverity.SecurityTool = tools.NpmAudit
vulnerabilitySeverity.Language = languages.Javascript
return vulnerabilitySeverity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (f *Formatter) getDefaultVulnerabilitySeverity() *horusec.Vulnerability {
vulnerabilitySeverity := &horusec.Vulnerability{}
vulnerabilitySeverity.SecurityTool = tools.YarnAudit
vulnerabilitySeverity.Language = languages.Javascript
vulnerabilitySeverity.File = "yarn.lock"
vulnerabilitySeverity.File = f.GetFilepathFromFilename("yarn.lock")
return vulnerabilitySeverity
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (f *Formatter) setupVulnerabilitiesSeveritiesBandit(
vulnerabilitySeverity.Code = f.GetCodeWithMaxCharacters(issues[index].Code, 0)
vulnerabilitySeverity.Line = strconv.Itoa(issues[index].LineNumber)
vulnerabilitySeverity.Confidence = issues[index].IssueConfidence
vulnerabilitySeverity.File = issues[index].FileName
vulnerabilitySeverity.File = issues[index].GetFile()

// Set vulnerabilitySeverity.VulnHash value
vulnerabilitySeverity = vulnhash.Bind(vulnerabilitySeverity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,6 @@ func (f *Formatter) getDefaultVulnerabilitySeverityInSafety() *horusec.Vulnerabi
vulnerabilitySeverity.SecurityTool = tools.Safety
vulnerabilitySeverity.Confidence = "-"
vulnerabilitySeverity.Column = "0"
vulnerabilitySeverity.File = "requirements.txt"
vulnerabilitySeverity.File = f.GetFilepathFromFilename("requirements.txt")
return vulnerabilitySeverity
}
10 changes: 10 additions & 0 deletions horusec-cli/internal/services/formatters/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ type IService interface {
RemoveSrcFolderFromPath(filepath string) string
GetCodeWithMaxCharacters(code string, column int) string
ToolIsToIgnore(tool tools.Tool) bool
GetFilepathFromFilename(filename string) string
}

type Service struct {
Expand Down Expand Up @@ -176,3 +177,12 @@ func (s *Service) getAHundredCharacters(code string, column int) string {

return codeFromColumn
}

func (s *Service) GetFilepathFromFilename(filename string) string {
filepath := file.GetPathIntoFilename(filename, s.GetConfigProjectPath())
if filepath != "" {
return filepath[1:]
}

return filepath
}
4 changes: 2 additions & 2 deletions horusec-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"horusecCliFilesOrPathsToIgnore": "**/e2e/**, **/examples/**, **/*.toml, **/*_test.go, **/*_mock.go, **/*README.md, **/development-kit/pkg/enums/engine/advisories/**, **/horusec-lp/.cache/**, **/horusec-lp/public/**, **/deployments/docker-compose*, **/horusec-cli/cmd/horusec/start/analysis/*, **/horusec-manager/src/helpers/localStorage/**",
"horusecCliReturnErrorIfFoundVulnerability": false,
"horusecCliProjectPath": "./",
"horusecCliFalsePositiveHashes": "b17a7ef9ebf374c594700c1bfbf9d3594de68f0fc23af6171269f1f629a8abcf, 0870cfa59cfe7ef087e45762ce1d66cb6fdc85196323fcfae2e90167f242e4b3, 3198f2595d15ba1a01174329c944e3af9f7b3a7af7914e857eb9b82684633236, b85977d0bc430b00f17bc9f431d70b272110afea2549ee41bf03369bf99572d2, 312a4ee6b6b74a8c667e6f907568d9feaa0f0a69091f322abbcdf0562b9a3914, a452ff6d2565d67f118c80866a38a25871606751421347211b8932eb55aed85b, 3a0c53aae9a54d01e97417f2e495ca74c1f8874b0e4805fc622e50f7633838a8, 6a669b83a533c64fccc304fd7dbf3d491e85ec0a852f0d154fe813704765da8e, 4d4cc9d51d9c049b4a7bcedd330445d54bab832a8760543ebf990e86c17fdca0, 4868ef9970205c00a1c48b0e3e0debccf5a31e2e68767e25bd1d6bab36966822, f4f5d429ea2a8cbed3813ee58bac655162c65e50c64f68b65de6cfe408ab91c1, 8fd7c193876b7a7d26936c897e15135693d26f55b3c7c91bbdd5024f8ce12f81, 87956a8852a3d1b4b904b48815904ecd8f8932cd577d3a109e4139b3b5955e2c, 020f321ecd79df4cde2d93a06e4e5ba711a315060d4a9ee167de518606ee853f",
"horusecCliRiskAcceptHashes": "ba56b6e4ac8f790026b82a488c5624d7e2d6f6dd60584a9375c3c8948b608dbf, 2ce87bddc40e085562618f441750eeefe3cffc79d0b05b2e07a98f644c55b2c5, e2eaa19612eed0124b1fec396f8d41381c618c677c2025fc07c1cd0ccbe92b3c, 0ffc51a6b0187bec02837cb1e8dddfa05519e83d861af3fbd553bc4d0fbe852d, 4294bf00b848d82c4e012f45e0747996eb75109e089a626af930580a7a179ea4, fa41e0534388707279458969d1dcdb58ff932357660e8855d2bb4170fdbcb391, 5114704fb26983f549c5f179a0a90d8e95c8db28f9e68d32d864b2a6743cb499, 068f660ece48b7ef680152a6553d6f231413712b5d228f68f6d70a4c10e2b00b, a438599f015899ab0ce0bc9030915a59629f978127e2eac2a6ea7caec974c8d6, ab8d60c9c0796a0d528faf6d0fcb8693388a7182f903046a4aa54ffd81e080c7, 000467d49617182841ba72f0b63ddd396e350356542342d60b957835e943fcdf, d057a467e98c66fa437c62b11afc3fbecbab63e2331fdfe299bad0a011e46707, 4530caeaffd6d7fa42cf73240710b141a455547d75dd643ecbdbc6adf7c66037, 1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ, 1e08930833e061f7e2e84d3a6fd51c25dd8528f06cad26828d7b782bf04caad3",
"horusecCliFalsePositiveHashes": "b17a7ef9ebf374c594700c1bfbf9d3594de68f0fc23af6171269f1f629a8abcf, 0870cfa59cfe7ef087e45762ce1d66cb6fdc85196323fcfae2e90167f242e4b3, 3198f2595d15ba1a01174329c944e3af9f7b3a7af7914e857eb9b82684633236, b85977d0bc430b00f17bc9f431d70b272110afea2549ee41bf03369bf99572d2, a452ff6d2565d67f118c80866a38a25871606751421347211b8932eb55aed85b, 3a0c53aae9a54d01e97417f2e495ca74c1f8874b0e4805fc622e50f7633838a8, 6a669b83a533c64fccc304fd7dbf3d491e85ec0a852f0d154fe813704765da8e, 4d4cc9d51d9c049b4a7bcedd330445d54bab832a8760543ebf990e86c17fdca0, 4868ef9970205c00a1c48b0e3e0debccf5a31e2e68767e25bd1d6bab36966822, f4f5d429ea2a8cbed3813ee58bac655162c65e50c64f68b65de6cfe408ab91c1, 8fd7c193876b7a7d26936c897e15135693d26f55b3c7c91bbdd5024f8ce12f81, 87956a8852a3d1b4b904b48815904ecd8f8932cd577d3a109e4139b3b5955e2c, 020f321ecd79df4cde2d93a06e4e5ba711a315060d4a9ee167de518606ee853f",
"horusecCliRiskAcceptHashes": "ba56b6e4ac8f790026b82a488c5624d7e2d6f6dd60584a9375c3c8948b608dbf, 2ce87bddc40e085562618f441750eeefe3cffc79d0b05b2e07a98f644c55b2c5, e2eaa19612eed0124b1fec396f8d41381c618c677c2025fc07c1cd0ccbe92b3c, 0ffc51a6b0187bec02837cb1e8dddfa05519e83d861af3fbd553bc4d0fbe852d, 4294bf00b848d82c4e012f45e0747996eb75109e089a626af930580a7a179ea4, fa41e0534388707279458969d1dcdb58ff932357660e8855d2bb4170fdbcb391, 068f660ece48b7ef680152a6553d6f231413712b5d228f68f6d70a4c10e2b00b, a438599f015899ab0ce0bc9030915a59629f978127e2eac2a6ea7caec974c8d6, ab8d60c9c0796a0d528faf6d0fcb8693388a7182f903046a4aa54ffd81e080c7, 000467d49617182841ba72f0b63ddd396e350356542342d60b957835e943fcdf, d057a467e98c66fa437c62b11afc3fbecbab63e2331fdfe299bad0a011e46707, 4530caeaffd6d7fa42cf73240710b141a455547d75dd643ecbdbc6adf7c66037, 1e08930833e061f7e2e84d3a6fd51c25dd8528f06cad26828d7b782bf04caad3, 5e915855ae4718929a9743a570d804b6201b715cd640778767fa8b8cfa70c0bd",
"horusecCliWorkDir": {
"go": [],
"csharp": [],
Expand Down
Loading

0 comments on commit 215b9ea

Please sign in to comment.