mestafrica / mobile-wallet-fraud-database

Currently, curbing mobile money fraud in the country is nearly impossible. To tackle this issue, we propose developing a real-time database that allows users to query and determine if a phone number is likely fraudulent based on public contributions, especially from those who have experienced fraud.
MIT License
0 stars 10 forks source link

Add Fraud Report #11

Closed alexboateng closed 2 months ago

alexboateng commented 3 months ago

Endpoint: /api/fraud/report Method: POST Description: Allows users to submit a new fraud report. Authorization Required: Yes

Parameters: Phone Number: The phone number reported as fraudulent. Network: The mobile network associated with the fraudulent number. (mtn, vodafone, airtel-tigo) Date Reported: The date when the fraud report is submitted (automatically set by the system). Date of Incidence: The date when the fraud incident occurred. Status: Option to mark the report as private or public. Comment: User's comments detailing the incident or other relevant information.

Validations: Phone Number: Must be valid. Network: Should be a valid network provider from a predefined list of carriers. Date of Incidence: Must be a valid date and logically cannot be after the date reported. Status: Must be either 'Private' or 'Public'. Comment: May enforce a character limit (e.g., 500 characters) and sanitize to prevent injection attacks.

Security Measures: Authorization Check: Verify that the user is logged in before allowing a report to be submitted. Input Sanitization: Ensure that all inputs are sanitized to prevent SQL injection and other forms of attacks.

Feedback: Success: "Your fraud report has been successfully submitted." Failure: Detailed error messages depending on the validation that failed, such as "Invalid phone number format."

Note: Add test cases for all scenarios

muchinon commented 2 months ago

@alexboateng I would like to pick up this issue

muchinon commented 2 months ago

https://github.com/mestafrica/mobile-wallet-fraud-database/pull/40