Skip to content

fix: use correct env var names in memguardian init#744

Open
AmSach wants to merge 1 commit intoprojectdiscovery:mainfrom
AmSach:fix/memguardian-env-var-names
Open

fix: use correct env var names in memguardian init#744
AmSach wants to merge 1 commit intoprojectdiscovery:mainfrom
AmSach:fix/memguardian-env-var-names

Conversation

@AmSach
Copy link
Copy Markdown

@AmSach AmSach commented May 9, 2026

Fixed incorrect env var names used in memguardian init() function.

Bug: The init() function was using the wrong env var names:

  • was reading instead of
  • was reading instead of

Fix: Changed both to use their respective, correctly-named env vars.

Before:

DefaultInterval = env.GetEnvOrDefault(MemGuardianMaxUsedRamRatioENV, time.Duration(time.Second*30))
maxRam := env.GetEnvOrDefault(MemGuardianMaxUsedRamRatioENV, )

After:

DefaultInterval = env.GetEnvOrDefault(MemGuardianIntervalENV, time.Duration(time.Second*30))
maxRam := env.GetEnvOrDefault(MemGuardianMaxUsedMemoryENV, )

This ensures that the documented env vars ( and ) actually work as intended.

@neo-by-projectdiscovery-dev
Copy link
Copy Markdown

neo-by-projectdiscovery-dev Bot commented May 9, 2026

Neo - PR Security Review

No security issues found

Comment @pdneo help for available commands. · Open in Neo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant