swagger-api / swagger-api/swagger-ui
Disable autocompletion for authorization secrets
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
When inputting values for the API key and bearer token, there's a possibility of autocompletion, which can potentially reveal previously used secrets.
We want these values to remain visible to users as they type, while ensuring that they are not exposed through autocompletion, similar to how it happens when creating secrets in GitHub repositories. As such, we propose to implement a simple solution by setting autoComplete=off for these inputs:
https://github.com/swagger-api/swagger-ui/blob/1367a8fbdfddd697b8c71493bb09c01baf17d5a3/src/core/components/auth/api-key-auth.jsx#L73-L78
Additional context or thoughts
This issue was raised with https://github.com/swagger-api/swagger-ui/pull/9858
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/core/components/auth/api-key-auth.jsx lines 73-78 and src/core/plugins/oas3/components/auth/http-auth.jsx lines 132-138, as linked in the issue. Verify how the API key and bearer token inputs are defined, then confirm that autocomplete is disabled while values remain visible during typing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, frontend, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100