Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 20, 2023
1 parent be733c4 commit 5bb3a88
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions _modules/CveXplore/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,30 @@ <h1>Source code for CveXplore.main</h1><div class="highlight"><pre>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;id&quot;</span><span class="p">][</span><span class="s2">&quot;$in&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_validate_cve_id</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;id&quot;</span><span class="p">][</span><span class="s2">&quot;$in&quot;</span><span class="p">]</span>
<span class="p">]</span>
<span class="k">if</span> <span class="s2">&quot;cvss&quot;</span> <span class="ow">in</span> <span class="n">dict_filter</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;cvss&quot;</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;cvss&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;cvss&quot;</span><span class="p">])</span>
<span class="k">if</span> <span class="s2">&quot;cvss3&quot;</span> <span class="ow">in</span> <span class="n">dict_filter</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;cvss3&quot;</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;cvss3&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;cvss3&quot;</span><span class="p">])</span>

<span class="k">if</span> <span class="s2">&quot;exploitabilityScore&quot;</span> <span class="ow">in</span> <span class="n">dict_filter</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;exploitabilityScore&quot;</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;exploitabilityScore&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;exploitabilityScore&quot;</span><span class="p">]</span>
<span class="p">)</span>
<span class="k">if</span> <span class="s2">&quot;exploitabilityScore3&quot;</span> <span class="ow">in</span> <span class="n">dict_filter</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;exploitabilityScore3&quot;</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;exploitabilityScore3&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;exploitabilityScore3&quot;</span><span class="p">]</span>
<span class="p">)</span>

<span class="k">if</span> <span class="s2">&quot;impactScore&quot;</span> <span class="ow">in</span> <span class="n">dict_filter</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;impactScore&quot;</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;impactScore&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;impactScore&quot;</span><span class="p">])</span>
<span class="k">if</span> <span class="s2">&quot;impactScore3&quot;</span> <span class="ow">in</span> <span class="n">dict_filter</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;impactScore3&quot;</span><span class="p">],</span> <span class="nb">str</span><span class="p">):</span>
<span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;impactScore3&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">dict_filter</span><span class="p">[</span><span class="s2">&quot;impactScore3&quot;</span><span class="p">])</span>

<span class="n">results</span> <span class="o">=</span> <span class="p">(</span>
<span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">datasource</span><span class="p">,</span> <span class="s2">&quot;store_</span><span class="si">{}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">entry_type</span><span class="p">))</span>
Expand Down

0 comments on commit 5bb3a88

Please sign in to comment.