Code editor validation rules
HackerEarth has introduced validation rules in the code execution environment.
Universal rules (applicable to all question types)
Restrictive rules that are applied to all question types.
|
Restriction |
Description |
Why |
|---|---|---|
|
Proxy environment variables are not allowed. |
Environment variables such as |
To prevent user-submitted code from routing network requests through external network paths. |
Rules for specific question types
Restrictive rules that are applied to particular question types.
|
Restriction |
Question type |
Description |
Why |
|---|---|---|---|
|
System command execution is not allowed. |
Programming, Approximate, Golf |
Language features that execute arbitrary system commands are not allowed. Note: In languages like Ruby, commands such as |
To prevent compromising the execution environment or introducing security vulnerabilities. |
|
Use of the |
Programming, Approximate, Golf |
The Note: This restriction applies even if the keyword is used inside comments. |
To compile and evaluate the candidate submission in a controlled workspace. |
|
Multiple top-level |
SQL |
Only one top-level Note: Only subqueries containing |
To ensure that each SQL submission produces a single result set in our evaluation environment, which is necessary for accurate automated checking. |