-
Notifications
You must be signed in to change notification settings - Fork 0
Create block.php #29
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
base: main
Are you sure you want to change the base?
Create block.php #29
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||||||||||||||||
| <?php | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| //ruleid: search-active-debug | ||||||||||||||||||||||||||
| ini_set("display_errors",1); | ||||||||||||||||||||||||||
| //ruleid: search-active-debug | ||||||||||||||||||||||||||
| ini_set("display_errors",true); | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semgrep identified a blocking 🔴 issue in your code: To resolve this comment: ✨ Commit Assistant fix suggestion
Suggested change
View step-by-step instructions
💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by search-active-debug. You can view more details about this finding in the Semgrep AppSec Platform. |
||||||||||||||||||||||||||
| //ruleid: search-active-debug | ||||||||||||||||||||||||||
| ini_set("display_errors","on"); | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semgrep identified a blocking 🔴 issue in your code: To resolve this comment: ✨ Commit Assistant fix suggestion
Suggested change
View step-by-step instructions
Alternatively, if you need to enable error display for development purposes, ensure that this setting is only active in a development environment and not in production. You can use environment variables or configuration files to manage this setting based on the environment. 💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by search-active-debug. You can view more details about this finding in the Semgrep AppSec Platform. |
||||||||||||||||||||||||||
| //ok: search-active-debug | ||||||||||||||||||||||||||
| ini_set("display_errors","off"); | ||||||||||||||||||||||||||
| //ok: search-active-debug | ||||||||||||||||||||||||||
| ini_set("display_errors",0); | ||||||||||||||||||||||||||
| //ruleid: search-active-debug | ||||||||||||||||||||||||||
| define("WP_DEBUG",true); | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semgrep identified a blocking 🔴 issue in your code: To resolve this comment: ✨ Commit Assistant fix suggestion
Suggested change
View step-by-step instructions
Alternatively, if you want to control debug settings based on the environment, use a conditional statement to set if (getenv('ENVIRONMENT') === 'development') {
define("WP_DEBUG", true);
} else {
define("WP_DEBUG", false);
}This approach allows you to enable debugging in development while keeping it disabled in production. 💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by search-active-debug. You can view more details about this finding in the Semgrep AppSec Platform. |
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified a blocking 🔴 issue in your code:
Debug logging is explicitly enabled. This can potentially disclose sensitive information and should never be active on production systems.
To resolve this comment:
✨ Commit Assistant fix suggestion
View step-by-step instructions
ini_set("display_errors",1);toini_set("display_errors",0);to disable error display.ini_set("display_errors",true);andini_set("display_errors","on");toini_set("display_errors",0);.define("WP_DEBUG",true);todefine("WP_DEBUG",false);to disable WordPress debugging.Disabling error display and debugging in production environments helps prevent the disclosure of sensitive information through error messages.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasonsAlternatively, triage in Semgrep AppSec Platform to ignore the finding created by search-active-debug.
You can view more details about this finding in the Semgrep AppSec Platform.