You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/10/13 03:30:13 UTC
[GitHub] [incubator-linkis] huangKai-2323 opened a new pull request, #3631: fix iast error
huangKai-2323 opened a new pull request, #3631:
URL: https://github.com/apache/incubator-linkis/pull/3631
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
You can learn more about contributing to Apache Linkis here: https://linkis.apache.org/community/how-to-contribute
Happy contributing!
-->
### What is the purpose of the change
EngineConn-Core defines the the abstractions and interfaces of the EngineConn core functions.
The Engine Service in Linkis 0.x is refactored, EngineConn will handle the engine connection
and session management.
### Related issues/PRs
Related issues: #590
Related pr:#591
### Brief change log
- Define the core abstraction and interfaces of the EngineConn Factory;
- Define the core abstraction and interfaces of Executor Manager.
### Checklist
- [x] I have read the [Contributing Guidelines on pull requests](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#pull-requests).
- [ ] I have explained the need for this PR and the problem it solves
- [ ] I have explained the changes or the new features added to this PR
- [ ] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [Linkis mailing list](https://linkis.apache.org/community/how-to-subscribe) first)
- [ ] **If this is a code change**: I have written unit tests to fully verify the new behavior.
<!--
Note
1. Mark the PR title as `[WIP] title` until it's ready to be reviewed.
如果PR还未准备好被review,请在标题上添加[WIP]标识(WIP work in progress)
2. Always add/update tests for any changes unless you have a good reason.
除非您有充分的理由,否则任何修改都需要添加/更新测试
3. Always update the documentation to reflect the changes made in the PR.
始终更新文档以反映 PR 中所做的更改
4. After the PR is submitted, please pay attention to the execution result of git action check.
If there is any failure, please adjust it in time
PR提交后,请关注git action check 执行结果,关键的check失败时,请及时修正
5. Before the pr is merged, if the commit is missing, you can continue to commit the code
在未合并前,如果提交有遗漏,您可以继续提交代码
6. After you submit PR, you can add assistant WeChat, the WeChat QR code is
https://user-images.githubusercontent.com/7869972/176336986-d6b9be8f-d1d3-45f1-aa45-8e6adf5dd244.png
您提交pr后,可以添加助手微信,微信二维码为
https://user-images.githubusercontent.com/7869972/176336986-d6b9be8f-d1d3-45f1-aa45-8e6adf5dd244.png
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] Alexkun commented on a diff in pull request #3631: fix sql-injection risk in linkis-data-source-manager and linkis-metadataquery
Posted by GitBox <gi...@apache.org>.
Alexkun commented on code in PR #3631:
URL: https://github.com/apache/incubator-linkis/pull/3631#discussion_r994269064
##########
linkis-public-enhancements/linkis-datasource/linkis-metadata-query/server/src/main/java/org/apache/linkis/metadata/query/server/utils/MetadataUtils.java:
##########
@@ -47,6 +48,10 @@ public class MetadataUtils {
private static final Logger LOG = LoggerFactory.getLogger(MetadataUtils.class);
+ private static final String NAME_REGEX = "^[a-zA-Z\\-\\d_\\.]+$";
Review Comment:
please refactor the regex to a config
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] Alexkun commented on a diff in pull request #3631: fix sql-injection risk in linkis-data-source-manager and linkis-metadataquery
Posted by GitBox <gi...@apache.org>.
Alexkun commented on code in PR #3631:
URL: https://github.com/apache/incubator-linkis/pull/3631#discussion_r994248800
##########
linkis-public-enhancements/linkis-datasource/linkis-metadata-query/server/src/main/java/org/apache/linkis/metadata/query/server/restful/MetadataCoreRestful.java:
##########
@@ -57,6 +59,10 @@ public Message getDatabases(
if (StringUtils.isBlank(system)) {
return Message.error("'system' is missing[缺少系统名]");
}
+ if (!MetadataUtils.nameRegexPattern.matcher(dataSourceId).matches()) {
+ return Message.error("'dataSourceId' is irregular[数据源错误]");
Review Comment:
use 'invalid' instead of 'irregular'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] codecov[bot] commented on pull request #3631: fix iast error
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #3631:
URL: https://github.com/apache/incubator-linkis/pull/3631#issuecomment-1276998462
# [Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/3631?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#3631](https://codecov.io/gh/apache/incubator-linkis/pull/3631?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (757ed3b) into [dev-1.3.1](https://codecov.io/gh/apache/incubator-linkis/commit/d58d966ba378eb9eac3d2988b6ee24a0a487129d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d58d966) will **decrease** coverage by `0.02%`.
> The diff coverage is `1.53%`.
```diff
@@ Coverage Diff @@
## dev-1.3.1 #3631 +/- ##
===============================================
- Coverage 14.31% 14.28% -0.03%
Complexity 1524 1524
===============================================
Files 1032 1032
Lines 38197 38262 +65
Branches 5375 5407 +32
===============================================
- Hits 5466 5464 -2
- Misses 31998 32038 +40
- Partials 733 760 +27
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-linkis/pull/3631?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...data/query/server/restful/MetadataCoreRestful.java](https://codecov.io/gh/apache/incubator-linkis/pull/3631/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLXB1YmxpYy1lbmhhbmNlbWVudHMvbGlua2lzLWRhdGFzb3VyY2UvbGlua2lzLW1ldGFkYXRhLXF1ZXJ5L3NlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvbGlua2lzL21ldGFkYXRhL3F1ZXJ5L3NlcnZlci9yZXN0ZnVsL01ldGFkYXRhQ29yZVJlc3RmdWwuamF2YQ==) | `45.91% <0.00%> (-22.27%)` | :arrow_down: |
| [...ata/query/server/restful/MetadataQueryRestful.java](https://codecov.io/gh/apache/incubator-linkis/pull/3631/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLXB1YmxpYy1lbmhhbmNlbWVudHMvbGlua2lzLWRhdGFzb3VyY2UvbGlua2lzLW1ldGFkYXRhLXF1ZXJ5L3NlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvbGlua2lzL21ldGFkYXRhL3F1ZXJ5L3NlcnZlci9yZXN0ZnVsL01ldGFkYXRhUXVlcnlSZXN0ZnVsLmphdmE=) | `54.08% <0.00%> (-26.23%)` | :arrow_down: |
| [...kis/metadata/query/server/utils/MetadataUtils.java](https://codecov.io/gh/apache/incubator-linkis/pull/3631/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLXB1YmxpYy1lbmhhbmNlbWVudHMvbGlua2lzLWRhdGFzb3VyY2UvbGlua2lzLW1ldGFkYXRhLXF1ZXJ5L3NlcnZlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvbGlua2lzL21ldGFkYXRhL3F1ZXJ5L3NlcnZlci91dGlscy9NZXRhZGF0YVV0aWxzLmphdmE=) | `2.85% <100.00%> (+2.85%)` | :arrow_up: |
| [...kis/engineplugin/spark/SparkEngineConnPlugin.scala](https://codecov.io/gh/apache/incubator-linkis/pull/3631/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9zcGFyay9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9lbmdpbmVwbHVnaW4vc3BhcmsvU3BhcmtFbmdpbmVDb25uUGx1Z2luLnNjYWxh) | `0.00% <0.00%> (-27.78%)` | :arrow_down: |
| [...a/org/apache/linkis/scheduler/queue/Consumer.scala](https://codecov.io/gh/apache/incubator-linkis/pull/3631/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWNvbW1vbnMvbGlua2lzLXNjaGVkdWxlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9zY2hlZHVsZXIvcXVldWUvQ29uc3VtZXIuc2NhbGE=) | `100.00% <0.00%> (+14.28%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] huangKai-2323 commented on a diff in pull request #3631: fix sql-injection risk in linkis-data-source-manager and linkis-metadataquery
Posted by GitBox <gi...@apache.org>.
huangKai-2323 commented on code in PR #3631:
URL: https://github.com/apache/incubator-linkis/pull/3631#discussion_r995438071
##########
linkis-public-enhancements/linkis-datasource/linkis-metadata-query/server/src/main/java/org/apache/linkis/metadata/query/server/utils/MetadataUtils.java:
##########
@@ -47,6 +48,10 @@ public class MetadataUtils {
private static final Logger LOG = LoggerFactory.getLogger(MetadataUtils.class);
+ private static final String NAME_REGEX = "^[a-zA-Z\\-\\d_\\.]+$";
Review Comment:
done
##########
linkis-public-enhancements/linkis-datasource/linkis-metadata-query/server/src/main/java/org/apache/linkis/metadata/query/server/restful/MetadataCoreRestful.java:
##########
@@ -57,6 +59,10 @@ public Message getDatabases(
if (StringUtils.isBlank(system)) {
return Message.error("'system' is missing[缺少系统名]");
}
+ if (!MetadataUtils.nameRegexPattern.matcher(dataSourceId).matches()) {
+ return Message.error("'dataSourceId' is irregular[数据源错误]");
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] peacewong merged pull request #3631: fix sql-injection risk in linkis-data-source-manager and linkis-metadataquery
Posted by GitBox <gi...@apache.org>.
peacewong merged PR #3631:
URL: https://github.com/apache/incubator-linkis/pull/3631
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org