Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⛏️ Write a test to check if a user can redeem the same coupon code multiple times #175

Open
5 tasks
aktoboy opened this issue Mar 7, 2023 · 16 comments
Open
5 tasks
Labels
feature request Requesting a new feature good first issue Good for newcomers hacktoberfest test

Comments

@aktoboy
Copy link
Contributor

aktoboy commented Mar 7, 2023

💭 Introduction:
We want to test whether an attacker can redeem the same coupon multiple times by exploiting race condition vulnerability.

🎯 Requirements:

  1. Filters - This test should run on apis which are used to redeem coupons. You can choose an API that has a query-param named "coupon".

  2. Execute - Re-run the same request without any changes

  3. Validate - If we get 90% response match, then it is vulnerable

The test should correctly detect whether the api is vulnerable to race condition.

✅ Task summary:

  • Ask to be assigned to the issue.
  • Wait to be assigned. We will try to assign in less than 2 hours.
  • Signup for Akto
  • Fork the tests-library repository, create a new branch and commit the yaml file which will be called in your test.
  • Submit both the PR here.

📚 Reading
You can find a detailed documentation of test editor rules here
Find 100+ examples of YAML tests here

🙋🏼‍♂️ Questions:
If you have questions, need any help, or just want to hang out, make sure to join us on our Discord server.

@aktoboy aktoboy added good first issue Good for newcomers feature request Requesting a new feature hackfest Hackathon - 24th march to 3rd april labels Mar 7, 2023
@roshhni97
Copy link

@aktoboy I want to work on this issue please assign it to me.

@Ankita28g
Copy link
Contributor

Thanks for your interest 🎉

Assigning to you! Happy hackfesting 🥳

@aktoboy
Copy link
Contributor Author

aktoboy commented Mar 17, 2023

Hey @Roshani9731, let me know if you need any help with this issue.

@Ankita28g Ankita28g added the test label Mar 18, 2023
@Ankita28g
Copy link
Contributor

Hi @Roshani9731 do you need any help with this?

@Ankita28g
Copy link
Contributor

Hi @Roshani9731 are you still working on this?

@Ankita28g
Copy link
Contributor

Hi @Roshani9731 thanks for your submission in Hackfest. 🔥 We are reviewing your work. Do these two below:

  1. Join this group on discord for discussions around prizes? 🚀 🏆
  2. Please fill this form your PR to be considered for prizes!

@Ankita28g Ankita28g added hacktoberfest and removed hackfest Hackathon - 24th march to 3rd april labels Sep 29, 2023
@harshalkh
Copy link

@ankush-jain-akto - I can work on this test. Could you please assign the same to me.

@Anurag-space
Copy link

@Ankita28g @ankush-jain-akto
hii there!
i want to work on the test to check if a user can redeem the same coupon code multiple times #175. could you assign me this issue.

@harshalkh
Copy link

harshalkh commented Oct 17, 2023

@Ankita28g @ankush-jain-akto I have raised a PR for this one. Please review and let me know if any suggestions/changes.
akto-api-security/tests-library#21

@SanchitMahajan236
Copy link

Hey @Ankita28g @ankush-jain-akto !! Can you please assign me this issue ?? I would love to contribute to it.

@avneesh-akto
Copy link
Contributor

@harshalkh your YAML seems to be invalid. Logic is correct but please run the template on some valid endpoint before you make a PR.

@harshalkh
Copy link

@harshalkh your YAML seems to be invalid. Logic is correct but please run the template on some valid endpoint before you make a PR.

@avneesh-akto - i have made changes and tested on Test editor. please check now. akto-api-security/tests-library#21

@avneesh-akto
Copy link
Contributor

Hello @harshalkh , could you please make a minor adjustment? Instead of solely searching for the coupon in the query parameters, could you also check for it in the request body? Thank you! Rest looks good to me

@avneesh-akto
Copy link
Contributor

Also change target branch to develop instead of master

@harshalkh
Copy link

harshalkh commented Oct 24, 2023

Also change target branch to develop instead of master

@avneesh-akto - requested changes done..
akto-api-security/tests-library#29

Also pls assign this issue to me.

@avneesh-akto
Copy link
Contributor

Looks good @harshalkh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requesting a new feature good first issue Good for newcomers hacktoberfest test
Projects
None yet
Development

No branches or pull requests

7 participants