Skip to content

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

Merged
Mzack9999 merged 1 commit into
projectdiscovery:mainfrom
AmSach:fix/memguardian-env-var-names
May 19, 2026
Merged

fix: use correct env var names in memguardian init#744
Mzack9999 merged 1 commit into
projectdiscovery:mainfrom
AmSach:fix/memguardian-env-var-names

Conversation

@AmSach
Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, both env vars were silently dead

@Mzack9999 Mzack9999 merged commit 6f93830 into projectdiscovery:main May 19, 2026
1 check passed
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.

2 participants