jsbench / jsbench/jsbench.github.io
Блокировка скрипта в проекте во время теста
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 263
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Если в сниппете кода теста присутствует какое-либо действие в ответ на событие, например скролл окна, то в момент, когда тестируется данный сниппет и срабатывает данное событие (и, значит, исполняется js код), может быть выполнено тело обработчика данного события :)
Например:
window.onscroll = function(ev) {
alert(8);
document.getElementById('canvas').remove();
};
Это вредит правильной, стабильной логике работы программы и открывает потенциальные уязвимости ;)
@RubaXa В данном контексте можно что-либо предпринять?
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
The issue provides no file or test entry point. Start by reproducing the event-handler behavior in a benchmark snippet, then trace how test code is executed and how browser events are exposed. Define which handlers must be blocked or isolated and add regression coverage demonstrating that the benchmark remains stable and cannot alter the page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- security, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100