Skip to content

[Integration and optimization proposal] for 2 user behavior analysis files in Shieldx-Auth services #30

@shieldx-bot

Description

@shieldx-bot

Current Problem Summary
In services services/shieldx-auth there are 2 files that process and analyze user behavior independently and I have an idea that integrate those 2 files into 1 and optimize it to become powerful

File path
1, shield/services/shieldx-auth/advanced_risk_scorer.go
2, shield/services/shieldx-auth/collector.go

** Please suggest unique ideas **
Instead of analyzing the score, we should choose another way to evaluate the risk of each action sent from the frontend. I want this method to be flexible and highly extensible so we can have more analysis logic to analyze without causing conflicts with the evaluation score like before
In my opinion
I think that instead of calculating by score we can optimize by voting, each function will analyze and calculate based on the score that the result returns true or false. then the main function will calculate the risk level based on the formula:

(function returns true / total function)
if score < 5 then dangerous
if score 5 < x < 7 put into suspicion monitoring
if score > 7 pass safety assessment

My optimal suggestion is
To be able to reduce the situation of processing too much resources, we will create a global variable to store IPs or some information about a safe user behavior, if the frontend sends it again, it will not need to process that IP anymore
return status = "STOP MONITORING" is the frontend will disable the user behavior capture, because DOM commands make the website lag and reduce user experience

How ​​to contribute
You just need to git clone to find the correct path of services shieldx-auth and edit a file collector.go , delete file advanced_risk_scorer.go, advanced_risk_scorer_test.go after done . to perform the integration , after integrating, create a test file for this part to see if it runs smoothly.
after sending the pull request, please explain clearly what you do, what is special in your code that no one else has, we will review all of it and then accept and approve your contribution, then honor you as a hero who is saving the world <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreTouch the core of the system (central logic, core service, shared package)discussion-neededFurther discussion is needed before implementation (especially when refactoring has a large impact)refactorInvolves refactoring or optimizing source code, not adding new features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions