Skip to content

Commit c8e01a7

Browse files
committed
2022
1 parent 1614b0f commit c8e01a7

File tree

15 files changed

+206
-81
lines changed

15 files changed

+206
-81
lines changed

.pre-commit-config.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,43 @@
11
repos:
22
- repo: https://github.com/FHPythonUtils/Blackt
3-
rev: '2021'
3+
rev: '2022.0.2'
44
hooks:
55
- id: blackt
66

77
- repo: https://github.com/pycqa/isort
8-
rev: 5.9.3
8+
rev: 5.10.1
99
hooks:
1010
- id: isort
1111

1212
- repo: https://github.com/pycqa/pylint
13-
rev: v2.11.1
13+
rev: v2.13.5
1414
hooks:
1515
- id: pylint
1616
args: [--disable=import-error,--jobs=0, --fail-under=9.8, --ignore-patterns=test.*?py]
1717

1818
- repo: https://github.com/pre-commit/pre-commit-hooks
19-
rev: v4.0.1
19+
rev: v4.2.0
2020
hooks:
2121
- id: trailing-whitespace
22+
exclude: "tests/"
2223
- id: end-of-file-fixer
24+
exclude: "tests/"
2325

2426
- repo: https://github.com/asottile/pyupgrade
25-
rev: v2.29.0
27+
rev: v2.32.0
2628
hooks:
2729
- id: pyupgrade
2830
args: [--py37-plus]
31+
- repo: https://github.com/boidolr/pre-commit-images
32+
rev: v1.0.4
33+
hooks:
34+
- id: optimize-avif
35+
exclude: "tests/"
36+
- id: optimize-jpg
37+
exclude: "tests/"
38+
- id: optimize-png
39+
exclude: "tests/"
40+
- id: optimize-svg
41+
exclude: "tests/"
42+
- id: optimize-webp
43+
exclude: "tests/"

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All major and minor version changes will be documented in this file. Details of
44
patch-level version changes can be found in [commit messages](../../commits/master).
55

6+
## 2022 - 2022/04/09
7+
8+
- Move docs
9+
- Exclude env/venv etc per https://github.com/FHPythonUtils/SimpleSecurity/issues/1
10+
- `semgrep` no longer works on windows so output message
11+
- Update pre-commit
12+
613
## 2021.3.3 - 2021/10/26
714

815
- Use pre-commit to enforce reasonable standards + consistency

DOCS/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ in the DOCS
111111
### Generate semgrep_sec.yaml
112112

113113
1. Clone https://github.com/returntocorp/semgrep-rules
114-
2. cd to project/python
114+
2. cd to `semgrep-rules/python`
115115
3. do
116116

117117
```bash
@@ -125,7 +125,20 @@ in the DOCS
125125

126126
## Documentation
127127

128-
See the [Docs](/DOCS/) for more information.
128+
A high-level overview of how the documentation is organized organized will help you know
129+
where to look for certain things:
130+
131+
<!--
132+
- [Tutorials](/documentation/tutorials) take you by the hand through a series of steps to get
133+
started using the software. Start here if you’re new.
134+
-->
135+
- The [Technical Reference](/documentation/reference) documents APIs and other aspects of the
136+
machinery. This documentation describes how to use the classes and functions at a lower level
137+
and assume that you have a good high-level understanding of the software.
138+
<!--
139+
- The [Help](/documentation/help) guide provides a starting point and outlines common issues that you
140+
may have.
141+
-->
129142

130143
## Install With PIP
131144

documentation/reference/MODULES.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Simplesecurity Modules
2+
3+
> Auto-generated documentation modules index.
4+
5+
Full list of [Simplesecurity](README.md#simplesecurity-index) project modules.
6+
7+
- [Simplesecurity Index](README.md#simplesecurity-index)
8+
- [Simplesecurity](simplesecurity/index.md#simplesecurity)
9+
- [Module](simplesecurity/module.md#module)
10+
- [Filter](simplesecurity/filter.md#filter)
11+
- [Formatter](simplesecurity/formatter.md#formatter)
12+
- [Level](simplesecurity/level.md#level)
13+
- [Plugins](simplesecurity/plugins.md#plugins)
14+
- [Types](simplesecurity/types.md#types)

documentation/reference/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Simplesecurity Modules
2+
3+
> Auto-generated documentation modules index.
4+
5+
Full list of [Simplesecurity](README.md#simplesecurity-index) project modules.
6+
7+
- [Simplesecurity Index](README.md#simplesecurity-index)
8+
- [Simplesecurity](simplesecurity/index.md#simplesecurity)
9+
- [Module](simplesecurity/module.md#module)
10+
- [Filter](simplesecurity/filter.md#filter)
11+
- [Formatter](simplesecurity/formatter.md#formatter)
12+
- [Level](simplesecurity/level.md#level)
13+
- [Plugins](simplesecurity/plugins.md#plugins)
14+
- [Types](simplesecurity/types.md#types)

DOCS/simplesecurity/filter.md renamed to documentation/reference/simplesecurity/filter.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# filter
1+
# Filter
22

3-
> Auto-generated documentation for [simplesecurity.filter](../../simplesecurity/filter.py) module.
3+
> Auto-generated documentation for [simplesecurity.filter](../../../simplesecurity/filter.py) module.
44
55
Some of our analysis tools overlap one-another so lets remove duplicates.
66

7-
- [Simplesecurity](../README.md#simplesecurity-index) / [Modules](../README.md#simplesecurity-modules) / [simplesecurity](index.md#simplesecurity) / filter
7+
- [Simplesecurity](../README.md#simplesecurity-index) / [Modules](../MODULES.md#simplesecurity-modules) / [Simplesecurity](index.md#simplesecurity) / Filter
88
- [deduplicate](#deduplicate)
99
- [filterSeverityAndConfidence](#filterseverityandconfidence)
1010
- [findingsEqual](#findingsequal)
1111
- [lookupId](#lookupid)
1212

1313
## deduplicate
1414

15-
[[find in source code]](../../simplesecurity/filter.py#L58)
15+
[[find in source code]](../../../simplesecurity/filter.py#L58)
1616

1717
```python
1818
def deduplicate(findings: list[Finding]) -> list[Finding]:
@@ -28,9 +28,13 @@ Deduplicate the list of findings.
2828

2929
- `list[Finding]` - new deduplicated list
3030

31+
#### See also
32+
33+
- [Finding](types.md#finding)
34+
3135
## filterSeverityAndConfidence
3236

33-
[[find in source code]](../../simplesecurity/filter.py#L78)
37+
[[find in source code]](../../../simplesecurity/filter.py#L78)
3438

3539
```python
3640
def filterSeverityAndConfidence(
@@ -52,9 +56,13 @@ Filter the list of findings.
5256

5357
- `list[Finding]` - new deduplicated list
5458

59+
#### See also
60+
61+
- [Finding](types.md#finding)
62+
5563
## findingsEqual
5664

57-
[[find in source code]](../../simplesecurity/filter.py#L36)
65+
[[find in source code]](../../../simplesecurity/filter.py#L36)
5866

5967
```python
6068
def findingsEqual(findingA: Finding, findingB: Finding) -> int:
@@ -78,7 +86,7 @@ Basically and __eq__ method for findings.
7886

7987
## lookupId
8088

81-
[[find in source code]](../../simplesecurity/filter.py#L22)
89+
[[find in source code]](../../../simplesecurity/filter.py#L22)
8290

8391
```python
8492
def lookupId(identifier: str) -> list[str]:

DOCS/simplesecurity/formatter.md renamed to documentation/reference/simplesecurity/formatter.md

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# formatter
1+
# Formatter
22

3-
> Auto-generated documentation for [simplesecurity.formatter](../../simplesecurity/formatter.py) module.
3+
> Auto-generated documentation for [simplesecurity.formatter](../../../simplesecurity/formatter.py) module.
44
55
Take our findings dictionary and give things a pretty format.
66

7-
- [Simplesecurity](../README.md#simplesecurity-index) / [Modules](../README.md#simplesecurity-modules) / [simplesecurity](index.md#simplesecurity) / formatter
7+
- [Simplesecurity](../README.md#simplesecurity-index) / [Modules](../MODULES.md#simplesecurity-modules) / [Simplesecurity](index.md#simplesecurity) / Formatter
88
- [ansi](#ansi)
99
- [csv](#csv)
1010
- [formatEvidence](#formatevidence)
@@ -36,7 +36,7 @@ Formats
3636

3737
## ansi
3838

39-
[[find in source code]](../../simplesecurity/formatter.py#L162)
39+
[[find in source code]](../../../simplesecurity/formatter.py#L162)
4040

4141
```python
4242
def ansi(
@@ -59,9 +59,13 @@ Format to ansi.
5959

6060
- `str` - String to write to a file of stdout
6161

62+
#### See also
63+
64+
- [Finding](types.md#finding)
65+
6266
## csv
6367

64-
[[find in source code]](../../simplesecurity/formatter.py#L120)
68+
[[find in source code]](../../../simplesecurity/formatter.py#L120)
6569

6670
```python
6771
def csv(
@@ -84,9 +88,13 @@ Format to CSV.
8488

8589
- `str` - String to write to a file of stdout
8690

91+
#### See also
92+
93+
- [Finding](types.md#finding)
94+
8795
## formatEvidence
8896

89-
[[find in source code]](../../simplesecurity/formatter.py#L35)
97+
[[find in source code]](../../../simplesecurity/formatter.py#L35)
9098

9199
```python
92100
def formatEvidence(evidence: list[Line], newlineChar: bool = True) -> str:
@@ -103,9 +111,13 @@ Format evidence to plaintext.
103111

104112
- `str` - string representation of this
105113

114+
#### See also
115+
116+
- [Line](types.md#line)
117+
106118
## json
107119

108-
[[find in source code]](../../simplesecurity/formatter.py#L97)
120+
[[find in source code]](../../../simplesecurity/formatter.py#L97)
109121

110122
```python
111123
def json(
@@ -128,9 +140,13 @@ Format to Json.
128140

129141
- `str` - String to write to a file of stdout
130142

143+
#### See also
144+
145+
- [Finding](types.md#finding)
146+
131147
## markdown
132148

133-
[[find in source code]](../../simplesecurity/formatter.py#L51)
149+
[[find in source code]](../../../simplesecurity/formatter.py#L51)
134150

135151
```python
136152
def markdown(
@@ -153,9 +169,13 @@ Format to Markdown.
153169

154170
- `str` - String to write to a file of stdout
155171

172+
#### See also
173+
174+
- [Finding](types.md#finding)
175+
156176
## sarif
157177

158-
[[find in source code]](../../simplesecurity/formatter.py#L253)
178+
[[find in source code]](../../../simplesecurity/formatter.py#L253)
159179

160180
```python
161181
def sarif(
@@ -177,3 +197,7 @@ Format to sarif https://sarifweb.azurewebsites.net/.
177197
#### Returns
178198

179199
- `str` - String to write to a file of stdout
200+
201+
#### See also
202+
203+
- [Finding](types.md#finding)

DOCS/simplesecurity/index.md renamed to documentation/reference/simplesecurity/index.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# simplesecurity
1+
# Simplesecurity
22

3-
> Auto-generated documentation for [simplesecurity](../../simplesecurity/__init__.py) module.
3+
> Auto-generated documentation for [simplesecurity](../../../simplesecurity/__init__.py) module.
44
55
Combine multiple popular python security tools and generate reports or output
66
into different formats
77

8-
- [Simplesecurity](../README.md#simplesecurity-index) / [Modules](../README.md#simplesecurity-modules) / simplesecurity
8+
- [Simplesecurity](../README.md#simplesecurity-index) / [Modules](../MODULES.md#simplesecurity-modules) / Simplesecurity
99
- [cli](#cli)
1010
- [runAllPlugins](#runallplugins)
1111
- Modules
12-
- [\_\_main\_\_](module.md#__main__)
13-
- [filter](filter.md#filter)
14-
- [formatter](formatter.md#formatter)
15-
- [level](level.md#level)
16-
- [plugins](plugins.md#plugins)
17-
- [types](types.md#types)
12+
- [Module](module.md#module)
13+
- [Filter](filter.md#filter)
14+
- [Formatter](formatter.md#formatter)
15+
- [Level](level.md#level)
16+
- [Plugins](plugins.md#plugins)
17+
- [Types](types.md#types)
1818

1919
Plugins (these require the plugin executable in the system path. e.g. bandit
2020
requires bandit to be in the system path...)
@@ -35,7 +35,7 @@ Formats
3535

3636
## cli
3737

38-
[[find in source code]](../../simplesecurity/__init__.py#L67)
38+
[[find in source code]](../../../simplesecurity/__init__.py#L67)
3939

4040
```python
4141
def cli():
@@ -45,11 +45,11 @@ Cli entry point.
4545

4646
## runAllPlugins
4747

48-
[[find in source code]](../../simplesecurity/__init__.py#L38)
48+
[[find in source code]](../../../simplesecurity/__init__.py#L38)
4949

5050
```python
5151
def runAllPlugins(
52-
pluginMap: dict[(str, Any)],
52+
pluginMap: dict[str, Any],
5353
severity: int,
5454
confidence: int,
5555
fast: bool,
@@ -68,3 +68,7 @@ pluginMap (dict[str, Any]): the plugin map
6868
#### Returns
6969

7070
- `list[Finding]` - list of findings
71+
72+
#### See also
73+
74+
- [Finding](types.md#finding)

0 commit comments

Comments
 (0)