4 Commits
Author SHA1 Message Date
Jannik Hollenbach 8204a3998c Update all easily recognisable node.js native imports to be properly prefixed as recommended by node.js
Signed-off-by: Jannik Hollenbach <[email protected]>
2025-03-31 21:41:59 +02:00
Björn Kimminich 1863fbfc71 Find also web3 code snippets 2023-09-11 01:52:16 +02:00
Jannik Hollenbach 08bbec0a7e Move logger to import 2023-05-06 18:23:06 +02:00
Soham ParateandJannik Hollenbach 5c14887d8e Consider coding challenges that have overlapping code snippets easier to solve (#1996)
* consider solving identical coding challenges easier if a challenge that uses the same code snippet is already solved

* import/export functions and objects for /lib/startup/identicalChallenges.ts

* running lib/startup/identicalChallenges at startup

* Fixed the code where a potential file system race condition could arise

* fixed RSN issue with 'exposed metrics' challenge

* migrating fileSniff function to a more generalized location and considering identical coding Challenges easier to solve

* consider identical(overlapping coding) Challenges easier to solve

* delete files that use outdated approach

* Update vuln code snippet code to only run once and generate the entire cache from that run

Previously the entire file-sniffs was run once per challenge and each run read the file multiple times

* Move pervious fileSniff code to startup and use from anti cheat

* Remove timer

* remove unncessary comments

* update rsn

* moving coding challenges from lib/startup/ to lib/

* code refactoring

* Adjust error messages and change expected status codes to 404

I don't think it's required to have a 412 status code for the case when the challenge exists but doesn't have snippets.
No snippets wre found so 404 is correct

Signed-off-by: Jannik Hollenbach <[email protected]>

* Fix snippets in yaml files not being found

Signed-off-by: Jannik Hollenbach <[email protected]>

* Change fs to default to async in coding challenge lib file

Signed-off-by: Jannik Hollenbach <[email protected]>

* Handle potential failure of file read

Signed-off-by: Jannik Hollenbach <[email protected]>

* remove comments

* Fixed error: Cannot find logger in codingChallenges

* reduced timeFactor of solving identical Challenges by 20%

---------

Signed-off-by: Jannik Hollenbach <[email protected]>
Co-authored-by: Jannik Hollenbach <[email protected]>
2023-04-20 12:05:39 +02:00