diff options
-rw-r--r-- | .readthedocs.yaml | 20 | ||||
-rw-r--r-- | docs/.gitignore | 3 | ||||
-rw-r--r-- | docs/_static/css/ribbon.css | 63 | ||||
-rwxr-xr-x | docs/_static/favicon.ico | bin | 0 -> 2102 bytes | |||
-rw-r--r-- | docs/_static/logo_onap_2017.png | bin | 0 -> 12278 bytes | |||
-rw-r--r-- | docs/conf.py | 15 | ||||
-rw-r--r-- | docs/conf.yaml | 7 | ||||
-rw-r--r-- | docs/requirements-docs.txt | 15 | ||||
-rw-r--r-- | docs/tox.ini | 22 | ||||
-rw-r--r-- | framework/pom.xml | 8 | ||||
-rw-r--r-- | framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java | 6 | ||||
-rw-r--r-- | grpc/pom.xml | 15 | ||||
-rw-r--r-- | main/pom.xml | 2 | ||||
-rw-r--r-- | profiles/http/pom.xml | 18 | ||||
-rw-r--r-- | profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java | 5 |
15 files changed, 192 insertions, 7 deletions
diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..3797dc8b --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +--- +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details +# Required +version: 2 + +formats: + - htmlzip + +build: + image: latest + +python: + version: 3.7 + install: + - requirements: docs/requirements-docs.txt + +sphinx: + configuration: docs/conf.py diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..43ca5b67 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,3 @@ +/.tox +/_build/* +/__pycache__/* diff --git a/docs/_static/css/ribbon.css b/docs/_static/css/ribbon.css new file mode 100644 index 00000000..6008cb1a --- /dev/null +++ b/docs/_static/css/ribbon.css @@ -0,0 +1,63 @@ +.ribbon { + z-index: 1000; + background-color: #a00; + overflow: hidden; + white-space: nowrap; + position: fixed; + top: 25px; + right: -50px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + -webkit-box-shadow: 0 0 10px #888; + -moz-box-shadow: 0 0 10px #888; + box-shadow: 0 0 10px #888; + +} + +.ribbon a { + border: 1px solid #faa; + color: #fff; + display: block; + font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 1px 0; + padding: 10px 50px; + text-align: center; + text-decoration: none; + text-shadow: 0 0 5px #444; + transition: 0.5s; +} + +.ribbon a:hover { + background: #c11; + color: #fff; +} + + +/* override table width restrictions */ +@media screen and (min-width: 767px) { + + .wy-table-responsive table td, .wy-table-responsive table th { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } +} + +@media screen and (max-width: 767px) { + .wy-table-responsive table td { + white-space: nowrap; + } +} + +/* fix width of the screen */ + +.wy-nav-content { + max-width: none; +} diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico Binary files differnew file mode 100755 index 00000000..cb712ebd --- /dev/null +++ b/docs/_static/favicon.ico diff --git a/docs/_static/logo_onap_2017.png b/docs/_static/logo_onap_2017.png Binary files differnew file mode 100644 index 00000000..5d064f43 --- /dev/null +++ b/docs/_static/logo_onap_2017.png diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..8f40e8b8 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,15 @@ +from docs_conf.conf import * + +branch = 'latest' +master_doc = 'index' + +linkcheck_ignore = [ + 'http://localhost', +] + +intersphinx_mapping = {} + +html_last_updated_fmt = '%d-%b-%y %H:%M' + +def setup(app): + app.add_stylesheet("css/ribbon_onap.css") diff --git a/docs/conf.yaml b/docs/conf.yaml new file mode 100644 index 00000000..ab592813 --- /dev/null +++ b/docs/conf.yaml @@ -0,0 +1,7 @@ +--- +project_cfg: onap +project: onap + +# Change this to ReleaseBranchName to modify the header +default-version: latest +# diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt new file mode 100644 index 00000000..b3188ddd --- /dev/null +++ b/docs/requirements-docs.txt @@ -0,0 +1,15 @@ +tox +Sphinx +doc8 +docutils +setuptools +six +sphinx_rtd_theme>=0.4.3 +sphinxcontrib-blockdiag +sphinxcontrib-needs>=0.2.3 +sphinxcontrib-nwdiag +sphinxcontrib-seqdiag +sphinxcontrib-swaggerdoc +sphinxcontrib-plantuml +sphinx_bootstrap_theme +lfdocs-conf diff --git a/docs/tox.ini b/docs/tox.ini new file mode 100644 index 00000000..edac8c35 --- /dev/null +++ b/docs/tox.ini @@ -0,0 +1,22 @@ +[tox] +minversion = 1.6 +envlist = docs, +skipsdist = true + +[testenv:docs] +basepython = python3 +deps = -r{toxinidir}/requirements-docs.txt +commands = + sphinx-build -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html + echo "Generated docs available in {toxinidir}/_build/html" +whitelist_externals = + echo + git + sh + +[testenv:docs-linkcheck] +basepython = python3 +#deps = -r{toxinidir}/requirements-docs.txt +commands = echo "Link Checking not enforced" +#commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./ {toxinidir}/_build/linkcheck +whitelist_externals = echo diff --git a/framework/pom.xml b/framework/pom.xml index 75d94ee7..7666c49e 100644 --- a/framework/pom.xml +++ b/framework/pom.xml @@ -54,20 +54,24 @@ <artifactId>commons-csv</artifactId> <version>1.3</version> </dependency> +<!-- Change version from 1.9 to 1.13 due to "sonatype-2012- + 0050" for commons-codec --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> - <version>1.9</version> + <version>1.13</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> <version>1.3.2</version> </dependency> +<!-- Change version from 3.2.9 to 5.1.2 due to "sonatype-2015- + 0327" for spring-core --> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> - <version>3.2.9.RELEASE</version> + <version>5.1.2.RELEASE</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> diff --git a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java index df94d594..e40dfdf4 100644 --- a/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java +++ b/framework/src/test/java/org/onap/cli/fw/utils/OnapCommandUtilsTest.java @@ -59,6 +59,7 @@ import static java.util.Collections.singletonList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import static org.junit.Assert.assertNotNull; import static org.onap.cli.fw.conf.OnapCommandConstants.IS_INCLUDE; import static org.onap.cli.fw.input.OnapCommandParameterType.ARRAY; import static org.onap.cli.fw.input.OnapCommandParameterType.BOOL; @@ -513,4 +514,9 @@ public class OnapCommandUtilsTest { } }; } + + @Test + public void testMd5(){ + assertNotNull(OnapCommandUtils.md5("a")); + } } diff --git a/grpc/pom.xml b/grpc/pom.xml index 75721607..e73be6b3 100644 --- a/grpc/pom.xml +++ b/grpc/pom.xml @@ -34,10 +34,23 @@ <grpc.version>1.8.0</grpc.version> </properties> <dependencies> +<!-- netty-codec-http2 excluded due to Security Issues:- CVE-2019-9512,CVE-2019-9514,CVE-2019-9515,CVE-2019-9518,CVE-2019-16869 + and added invulnerable netty-codec-http2 4.1.42.Final --> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-netty</artifactId> <version>${grpc.version}</version> + <exclusions> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http2</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http2</artifactId> + <version>4.1.42.Final</version> </dependency> <dependency> <groupId>io.grpc</groupId> @@ -165,4 +178,4 @@ </plugins> </pluginManagement> </build> -</project>
\ No newline at end of file +</project> diff --git a/main/pom.xml b/main/pom.xml index 9a5465c2..fd810e96 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -44,7 +44,7 @@ <dependency> <groupId>jline</groupId> <artifactId>jline</artifactId> - <version>2.6</version> + <version>2.14.3</version> </dependency> <dependency> <groupId>junit</groupId> diff --git a/profiles/http/pom.xml b/profiles/http/pom.xml index b8563e48..9268895d 100644 --- a/profiles/http/pom.xml +++ b/profiles/http/pom.xml @@ -37,11 +37,27 @@ <artifactId>cli-sample-mock-generator</artifactId> <version>${project.version}</version> </dependency> +<!--Change version from 4.3.5 to 4.5.7 due to sonatype-2017- +0359 and CVE-2015-526. +Excluded commons-codec vulnerable version and added invulnerable version + + --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> - <version>4.3.5</version> + <version>4.5.7</version> + <exclusions> + <exclusion> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + </exclusion> + </exclusions> </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.13</version> + </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java index 3f426bf3..e8924470 100644 --- a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java +++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java @@ -35,7 +35,8 @@ import javax.net.ssl.X509TrustManager; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; -import org.apache.http.annotation.NotThreadSafe; +import org.apache.http.annotation.Contract; +import org.apache.http.annotation.ThreadingBehavior; import org.apache.http.client.CookieStore; import org.apache.http.client.HttpClient; import org.apache.http.client.config.RequestConfig; @@ -372,7 +373,7 @@ public class OnapHttpConnection { } } - @NotThreadSafe + @Contract(threading = ThreadingBehavior.UNSAFE) static class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase { public HttpDeleteWithBody() { |