-
Notifications
You must be signed in to change notification settings - Fork 525
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
Not allowed perform sensitive operations via gremlin #176
Conversation
809a811
to
b53ff33
Compare
b53ff33
to
88a772f
Compare
88a772f
to
7d919b0
Compare
7d919b0
to
e7d4d94
Compare
hugegraph-api/src/main/java/com/baidu/hugegraph/api/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/exception/SecurityException.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/GremlinAPI.java
Outdated
Show resolved
Hide resolved
a5f5ce3
to
d2dc070
Compare
Codecov Report
@@ Coverage Diff @@
## master #176 +/- ##
============================================
+ Coverage 71.42% 71.91% +0.48%
- Complexity 3527 3617 +90
============================================
Files 216 218 +2
Lines 16657 16802 +145
Branches 2379 2389 +10
============================================
+ Hits 11898 12083 +185
+ Misses 3509 3464 -45
- Partials 1250 1255 +5
Continue to review full report at Codecov.
|
only check in the gremlin threads, also consider asynchronous gremlin job |
hugegraph-api/src/main/java/com/baidu/hugegraph/api/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
5778b9a
to
08d01f7
Compare
hugegraph-api/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
f6fde25
to
1cc250c
Compare
hugegraph-api/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
Outdated
Show resolved
Hide resolved
hugegraph-api/src/main/java/com/baidu/hugegraph/api/gremlin/GremlinAPI.java
Show resolved
Hide resolved
b06a5fc
to
966726f
Compare
hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/com/baidu/hugegraph/security/HugeSecurityManager.java
Show resolved
Hide resolved
859f530
to
a7e1bd4
Compare
hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/SecurityManagerTest.java
Outdated
Show resolved
Hide resolved
hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/SecurityManagerTest.java
Outdated
Show resolved
Hide resolved
hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/SecurityManagerTest.java
Outdated
Show resolved
Hide resolved
Implement #145 Change-Id: I9a590fe40d3b5a808b569ed0af8fd83214a2941a
Change-Id: I10faac1d2b5a0eeb925961c3a2d3287d45a7271c
Change-Id: I5d9e4b97aa7da9603c9654f35610c6d15a0dc485
Change-Id: I5af3b2b23b2c4d2b0acd68773e13af96bf349735
Change-Id: I53371c58257d28d2e1f6e567c0e790428c35576b
Change-Id: Ic76795aca51685289546149509492fe9b1eb3736
Change-Id: Ie4ebf0f499434a8d561ff56611cbf1554ba4049a
Change-Id: I9e73542272adb9ee6e3a4fdad1b60ce47747ed5b
Change-Id: I8db5dbb14470db6e357e3f442e79c625343fa9a1
Change-Id: Ia9ace74728757140d2de8596bf3695f4e018493a
Change-Id: I68d699273422d49d599fd674b393c2b19451b4ba
Change-Id: I20b149ca2fbf7695e03c8d19cbd1279be6041e5a
Change-Id: Ie18b2226f2b0f2587860e8d4e233a6f528acb2c5
Change-Id: Id42b8d4fd5cd4ce487fd880ddb32de7a07a9cc36
Change-Id: I96b88d3fe78062b8951a21e3022219f7bdf4f2bc
Change-Id: I3e175559bfc0efb3c5beea794b0a6b7b19d63e50
} | ||
|
||
@Override | ||
public void checkPackageAccess(String pkg) { |
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.
seems redundant. why?
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.
just override all methods explicitly, avoid dangers caused by omissions
|
||
@Test | ||
public void testExec() throws IOException { | ||
Runtime.getRuntime().exec("ls"); |
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.
same command is better
hugegraph-test/src/main/java/com/baidu/hugegraph/unit/core/SecurityManagerTest.java
Outdated
Show resolved
Hide resolved
Change-Id: Iec95172d2fe97613eb210aacb2a0843145df2f9c
Implement #145
Change-Id: I9a590fe40d3b5a808b569ed0af8fd83214a2941a