Skip to content
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

security: warn if api_key given in config and config is world-readable #927

Open
leondz opened this issue Sep 23, 2024 · 0 comments
Open
Labels
cli Command-line interface functions enhancement Architectural upgrades
Milestone

Comments

@leondz
Copy link
Collaborator

leondz commented Sep 23, 2024

Summary

If a parsed config file contains an api_key value, test if that config file is world-readable. If it is, print a warning.

Basic example

config.yaml, chmod 777

---
plugins:
  generators:
    openai:
      api_key: oh no

output:

$ garak --config config.yaml
🛑 the specified config "config.yaml" contains a secret but can be read by anyone. change its permissions.

Motivation

Help our users be less insecure

@leondz leondz added enhancement Architectural upgrades cli Command-line interface functions labels Sep 23, 2024
@leondz leondz added this to the 24.12 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command-line interface functions enhancement Architectural upgrades
Projects
None yet
Development

No branches or pull requests

1 participant