Skip to content
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

Add missing dependencies in Dockerfile #164

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down
28 changes: 14 additions & 14 deletions docs/pytm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ <h3>Instance variables</h3>
return &#34;{0}({1})&#34;.format(type(self).__name__, self.name)

def _uniq_name(self):
&#34;&#34;&#34; transform name and uuid into a unique string &#34;&#34;&#34;
&#34;&#34;&#34;transform name and uuid into a unique string&#34;&#34;&#34;
h = sha224(str(self.uuid).encode(&#34;utf-8&#34;)).hexdigest()
name = &#34;&#34;.join(x for x in self.name if x.isalpha())
return &#34;{0}_{1}_{2}&#34;.format(type(self).__name__.lower(), name, h[:10])
Expand Down Expand Up @@ -1707,7 +1707,7 @@ <h3>Instance variables</h3>
pass

def oneOf(self, *elements):
&#34;&#34;&#34; Is self one of a list of Elements &#34;&#34;&#34;
&#34;&#34;&#34;Is self one of a list of Elements&#34;&#34;&#34;
for element in elements:
if inspect.isclass(element):
if isinstance(self, element):
Expand All @@ -1717,7 +1717,7 @@ <h3>Instance variables</h3>
return False

def crosses(self, *boundaries):
&#34;&#34;&#34; Does self (dataflow) cross any of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;Does self (dataflow) cross any of the list of boundaries&#34;&#34;&#34;
if self.source.inBoundary is self.sink.inBoundary:
return False
for boundary in boundaries:
Expand All @@ -1741,15 +1741,15 @@ <h3>Instance variables</h3>
return False

def enters(self, *boundaries):
&#34;&#34;&#34; does self (dataflow) enter into one of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;does self (dataflow) enter into one of the list of boundaries&#34;&#34;&#34;
return self.source.inBoundary is None and self.sink.inside(*boundaries)

def exits(self, *boundaries):
&#34;&#34;&#34; does self (dataflow) exit one of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;does self (dataflow) exit one of the list of boundaries&#34;&#34;&#34;
return self.source.inside(*boundaries) and self.sink.inBoundary is None

def inside(self, *boundaries):
&#34;&#34;&#34; is self inside of one of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;is self inside of one of the list of boundaries&#34;&#34;&#34;
for boundary in boundaries:
if inspect.isclass(boundary):
if isinstance(self.inBoundary, boundary):
Expand Down Expand Up @@ -1971,7 +1971,7 @@ <h3>Methods</h3>
<span>Expand source code</span>
</summary>
<pre><code class="python">def crosses(self, *boundaries):
&#34;&#34;&#34; Does self (dataflow) cross any of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;Does self (dataflow) cross any of the list of boundaries&#34;&#34;&#34;
if self.source.inBoundary is self.sink.inBoundary:
return False
for boundary in boundaries:
Expand Down Expand Up @@ -2018,7 +2018,7 @@ <h3>Methods</h3>
<span>Expand source code</span>
</summary>
<pre><code class="python">def enters(self, *boundaries):
&#34;&#34;&#34; does self (dataflow) enter into one of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;does self (dataflow) enter into one of the list of boundaries&#34;&#34;&#34;
return self.source.inBoundary is None and self.sink.inside(*boundaries)</code></pre>
</details>
</dd>
Expand All @@ -2032,7 +2032,7 @@ <h3>Methods</h3>
<span>Expand source code</span>
</summary>
<pre><code class="python">def exits(self, *boundaries):
&#34;&#34;&#34; does self (dataflow) exit one of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;does self (dataflow) exit one of the list of boundaries&#34;&#34;&#34;
return self.source.inside(*boundaries) and self.sink.inBoundary is None</code></pre>
</details>
</dd>
Expand All @@ -2046,7 +2046,7 @@ <h3>Methods</h3>
<span>Expand source code</span>
</summary>
<pre><code class="python">def inside(self, *boundaries):
&#34;&#34;&#34; is self inside of one of the list of boundaries &#34;&#34;&#34;
&#34;&#34;&#34;is self inside of one of the list of boundaries&#34;&#34;&#34;
for boundary in boundaries:
if inspect.isclass(boundary):
if isinstance(self.inBoundary, boundary):
Expand All @@ -2066,7 +2066,7 @@ <h3>Methods</h3>
<span>Expand source code</span>
</summary>
<pre><code class="python">def oneOf(self, *elements):
&#34;&#34;&#34; Is self one of a list of Elements &#34;&#34;&#34;
&#34;&#34;&#34;Is self one of a list of Elements&#34;&#34;&#34;
for element in elements:
if inspect.isclass(element):
if isinstance(self, element):
Expand Down Expand Up @@ -2141,7 +2141,7 @@ <h3>Instance variables</h3>
severity = varString(&#34;&#34;, required=True, doc=&#34;Threat severity&#34;)
mitigations = varString(&#34;&#34;, required=True, doc=&#34;Threat mitigations&#34;)
example = varString(&#34;&#34;, required=True, doc=&#34;Threat example&#34;)
id = varInt(&#34;&#34;, required=True, doc=&#34;Finding ID&#34;)
id = varString(&#34;&#34;, required=True, doc=&#34;Finding ID&#34;)
threat_id = varString(&#34;&#34;, required=True, doc=&#34;Threat ID&#34;)
references = varString(&#34;&#34;, required=True, doc=&#34;Threat references&#34;)
condition = varString(&#34;&#34;, required=True, doc=&#34;Threat condition&#34;)
Expand Down Expand Up @@ -3602,7 +3602,7 @@ <h3>Class variables</h3>
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
Expand Down Expand Up @@ -4230,7 +4230,7 @@ <h3>Methods</h3>
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
Expand Down