-
Notifications
You must be signed in to change notification settings - Fork 106
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
Правило "Запуск внешних приложений" - ExternalAppStarting #3115
Conversation
@nixel2007 @theshadowco @otymko Правило готово, проверяйте. |
Kudos, SonarCloud Quality Gate passed! |
...java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic.java
Show resolved
Hide resolved
...github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic_en.properties
Outdated
Show resolved
Hide resolved
...github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic_ru.properties
Outdated
Show resolved
Hide resolved
.../com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnosticTest.java
Show resolved
Hide resolved
переделаны тесты выполнен precommit
WalkthroughThe recent updates introduce a diagnostic feature to identify and manage security risks associated with the execution of external applications from 1C code. This enhancement aims to extend security measures, covering various methods of launching external programs and providing a mechanism to avoid false positives, with a focus on maintaining the security and integrity of the codebase. Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- src/main/resources/com/github/_1c_syntax/bsl/languageserver/configuration/parameters-schema.json
Files selected for processing (7)
- docs/diagnostics/ExternalAppStarting.md (1 hunks)
- docs/en/diagnostics/ExternalAppStarting.md (1 hunks)
- src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic.java (1 hunks)
- src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic_en.properties (1 hunks)
- src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic_ru.properties (1 hunks)
- src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnosticTest.java (1 hunks)
- src/test/resources/diagnostics/ExternalAppStartingDiagnostic.bsl (1 hunks)
Files skipped from review due to trivial changes (2)
- docs/en/diagnostics/ExternalAppStarting.md
- src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic_ru.properties
Additional comments: 5
src/main/resources/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic_en.properties (1)
- 1-4: The English localization for the diagnostic messages is correctly formatted and consistent with the diagnostic's purpose.
src/test/resources/diagnostics/ExternalAppStartingDiagnostic.bsl (1)
- 2-58: The BSL script file contains comprehensive test cases for the diagnostic, covering a variety of methods that should be flagged.
src/main/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnostic.java (1)
- 35-79: The Java class implementing the diagnostic correctly declares parameters and the configure method appends the pattern for navigation links based on the checkGotoUrl parameter.
docs/diagnostics/ExternalAppStarting.md (1)
- 1-78: The Markdown documentation for the diagnostic is clear and provides useful examples and sources.
src/test/java/com/github/_1c_syntax/bsl/languageserver/diagnostics/ExternalAppStartingDiagnosticTest.java (1)
- 37-131: The Java test class for the diagnostic includes tests that cover its behavior with different configurations.
Описание
Реализовано новое правило "Запуск внешних приложений" - ExternalAppStarting
для исключения ФП нужно добавить флаг для срабатывания на ПерейтиПоНавигационнойСсылке или ФайловаяСистемаКлиент.ОткрытьНавигационнуюСсылку
Скорее всего, нужен еще параметр правила для глобальных методов и методов объектов
чтобы добавлять новые методы, например, из типовых конфигураций или БСП
Добавить ЗапуститьСистему
Отдельная проверка на COM-объекты не нужна
например, на все (лучше) или только "Wscript.Shell" и "Shell.Application" (хуже)
Связанные задачи
Closes #3114
Чеклист
Общие
gradlew precommit
)Для диагностик
Дополнительно
Summary by CodeRabbit
New Features
Documentation
Localization
Tests