Skip to content

Conversation

e-dobrowolska
Copy link

Right now, genai_perf prints unmasked credentials in logs:

[2025-07-09 14:34:23] INFO     Running Perf Analyzer : 'perf_analyzer -m meta/llama-3.1-8b-instruct -async     subcommand.py:98
                               --stability-percentage 999 --request-count 10 -i http -u                                               
                               https://integrate.api.nvidia.com --concurrency-range 1 --service-kind openai                           
                               --endpoint v1/chat/completions -H Authorization: Bearer                                                
           printed here -->    <api_key_here> --input-data
                               ...[the rest of the comand]

This small PR changes the logging statement to mask the api keys (replace them with asterisks).
Example log after the change:

[2025-07-09 22:09:42] INFO     Running Perf Analyzer : 'perf_analyzer -m meta/llama-3.1-8b-instruct --async  subcommand.py:102
                               --stability-percentage 999 --request-count 5 -i http -u                                              
                               https://integrate.api.nvidia.com --concurrency-range 1 --service-kind openai                         
                               --endpoint v1/chat/completions --max-threads=1 -H Authorization: Bearer ********                     
                               --input-data                                                                                         
                               ...[the rest of the comand]

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