From 7ecf1eaecfe6a263c47a53698aadec6709681aac Mon Sep 17 00:00:00 2001 From: Jan Was Date: Thu, 3 Jun 2021 18:34:08 +0000 Subject: [PATCH] Add missing dependencies in Dockerfile --- Dockerfile | 12 +++++++----- docs/pytm/index.html | 28 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4976ac..3129bf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,14 @@ -FROM python:3.8.6-alpine3.12 +FROM python:3.9.5-alpine3.13 WORKDIR /usr/src/app ENTRYPOINT ["sh"] -ENV PLANTUML_VER 1.2020.18 +ENV PLANTUML_VER 1.2021.7 ENV PLANTUML_PATH /usr/local/lib/plantuml.jar -ENV PANDOC_VER 2.10.1 +ENV PANDOC_VER 2.14.0.1 RUN apk add --no-cache graphviz openjdk11-jre fontconfig make curl ttf-liberation ttf-linux-libertine ttf-dejavu \ + && apk add --no-cache --virtual .build-deps gcc musl-dev \ && rm -rf /var/cache/apk/* \ && curl -LO https://netix.dl.sourceforge.net/project/plantuml/$PLANTUML_VER/plantuml.$PLANTUML_VER.jar \ && mv plantuml.$PLANTUML_VER.jar $PLANTUML_PATH \ @@ -17,8 +18,9 @@ RUN apk add --no-cache graphviz openjdk11-jre fontconfig make curl ttf-liberatio ENV _JAVA_OPTIONS -Duser.home=/tmp -Dawt.useSystemAAFontSettings=gasp RUN printf '@startuml\n@enduml' | java -Djava.awt.headless=true -jar $PLANTUML_PATH -tpng -pipe >/dev/null -COPY requirements.txt ./ -RUN pip install --no-cache-dir -r requirements.txt +COPY requirements.txt requirements-dev.txt ./ +RUN pip install --no-cache-dir -r requirements-dev.txt \ + && apk del .build-deps COPY pytm ./pytm COPY docs ./docs diff --git a/docs/pytm/index.html b/docs/pytm/index.html index f54328a..30cb0a5 100644 --- a/docs/pytm/index.html +++ b/docs/pytm/index.html @@ -1653,7 +1653,7 @@

Instance variables

return "{0}({1})".format(type(self).__name__, self.name) def _uniq_name(self): - """ transform name and uuid into a unique string """ + """transform name and uuid into a unique string""" h = sha224(str(self.uuid).encode("utf-8")).hexdigest() name = "".join(x for x in self.name if x.isalpha()) return "{0}_{1}_{2}".format(type(self).__name__.lower(), name, h[:10]) @@ -1707,7 +1707,7 @@

Instance variables

pass def oneOf(self, *elements): - """ Is self one of a list of Elements """ + """Is self one of a list of Elements""" for element in elements: if inspect.isclass(element): if isinstance(self, element): @@ -1717,7 +1717,7 @@

Instance variables

return False def crosses(self, *boundaries): - """ Does self (dataflow) cross any of the list of boundaries """ + """Does self (dataflow) cross any of the list of boundaries""" if self.source.inBoundary is self.sink.inBoundary: return False for boundary in boundaries: @@ -1741,15 +1741,15 @@

Instance variables

return False def enters(self, *boundaries): - """ does self (dataflow) enter into one of the list of boundaries """ + """does self (dataflow) enter into one of the list of boundaries""" return self.source.inBoundary is None and self.sink.inside(*boundaries) def exits(self, *boundaries): - """ does self (dataflow) exit one of the list of boundaries """ + """does self (dataflow) exit one of the list of boundaries""" return self.source.inside(*boundaries) and self.sink.inBoundary is None def inside(self, *boundaries): - """ is self inside of one of the list of boundaries """ + """is self inside of one of the list of boundaries""" for boundary in boundaries: if inspect.isclass(boundary): if isinstance(self.inBoundary, boundary): @@ -1971,7 +1971,7 @@

Methods

Expand source code
def crosses(self, *boundaries):
-    """ Does self (dataflow) cross any of the list of boundaries """
+    """Does self (dataflow) cross any of the list of boundaries"""
     if self.source.inBoundary is self.sink.inBoundary:
         return False
     for boundary in boundaries:
@@ -2018,7 +2018,7 @@ 

Methods

Expand source code
def enters(self, *boundaries):
-    """ does self (dataflow) enter into one of the list of boundaries """
+    """does self (dataflow) enter into one of the list of boundaries"""
     return self.source.inBoundary is None and self.sink.inside(*boundaries)
@@ -2032,7 +2032,7 @@

Methods

Expand source code
def exits(self, *boundaries):
-    """ does self (dataflow) exit one of the list of boundaries """
+    """does self (dataflow) exit one of the list of boundaries"""
     return self.source.inside(*boundaries) and self.sink.inBoundary is None
@@ -2046,7 +2046,7 @@

Methods

Expand source code
def inside(self, *boundaries):
-    """ is self inside of one of the list of boundaries """
+    """is self inside of one of the list of boundaries"""
     for boundary in boundaries:
         if inspect.isclass(boundary):
             if isinstance(self.inBoundary, boundary):
@@ -2066,7 +2066,7 @@ 

Methods

Expand source code
def oneOf(self, *elements):
-    """ Is self one of a list of Elements """
+    """Is self one of a list of Elements"""
     for element in elements:
         if inspect.isclass(element):
             if isinstance(self, element):
@@ -2141,7 +2141,7 @@ 

Instance variables

severity = varString("", required=True, doc="Threat severity") mitigations = varString("", required=True, doc="Threat mitigations") example = varString("", required=True, doc="Threat example") - id = varInt("", required=True, doc="Finding ID") + id = varString("", required=True, doc="Finding ID") threat_id = varString("", required=True, doc="Threat ID") references = varString("", required=True, doc="Threat references") condition = varString("", required=True, doc="Threat condition") @@ -3602,7 +3602,7 @@

Class variables

continue finding_count += 1 - f = Finding(e, id=finding_count, threat=t) + f = Finding(e, id=str(finding_count), threat=t) findings.append(f) elements[e].append(f) self.findings = findings @@ -4230,7 +4230,7 @@

Methods

continue finding_count += 1 - f = Finding(e, id=finding_count, threat=t) + f = Finding(e, id=str(finding_count), threat=t) findings.append(f) elements[e].append(f) self.findings = findings