pyannotators-patterns 0.6.23__tar.gz → 1.6.25__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/Jenkinsfile +36 -20
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/PKG-INFO +1 -1
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/src/pyannotators_patterns/__init__.py +1 -1
- pyannotators_patterns-0.6.23/trivy +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/.bumpversion.cfg +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/.github/workflows/main.yml +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/.gitignore +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/.pre-commit-config.yaml +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/.readthedocs.yml +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/AUTHORS.md +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/CHANGELOG.md +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/Dockerfile +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/LICENSE +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/MIGRATION.md +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/README.md +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/RELEASE.md +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/bumpversion.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/docs/.gitignore +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/docs/CHANGELOG.md +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/docs/LICENSE +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/docs/_static/.gitkeep +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/docs/_templates/.gitkeep +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/docs/conf.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/docs/index.rst +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/mypy.ini +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/pyproject.toml +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/src/pyannotators_patterns/named_pattern_recognizer.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/src/pyannotators_patterns/patterns.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/assertions.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/data/coords-document.json +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/data/coords.json +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/data/mgrs-document.json +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/data/mgrs.json +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/data/tel-document.json +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/data/tel.json +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/test_annotator.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/test_coords.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/test_credit_cards.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/test_emails.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/test_mgrs.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/test_tel.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/test_zip.py +0 -0
- {pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/trivy-html-template.tpl +0 -0
|
@@ -6,6 +6,14 @@ pipeline {
|
|
|
6
6
|
|
|
7
7
|
agent none
|
|
8
8
|
|
|
9
|
+
options {
|
|
10
|
+
throttleJobProperty(
|
|
11
|
+
categories: ['pyannotators'],
|
|
12
|
+
throttleEnabled: true,
|
|
13
|
+
throttleOption: 'category'
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
triggers {
|
|
10
18
|
upstream(upstreamProjects: 'pymultirole_plugins/' + BRANCH_NAME.replaceAll('/', '%2F'),\
|
|
11
19
|
threshold: hudson.model.Result.SUCCESS)
|
|
@@ -18,16 +26,17 @@ pipeline {
|
|
|
18
26
|
PYTHONPYCACHEPREFIX = '/tmp/.pytest_cache'
|
|
19
27
|
PYTHONDONTWRITEBYTECODE = '1'
|
|
20
28
|
JENKINS_UIDGID = '1004:1004'
|
|
29
|
+
SBOM_PROJECT_NAME = "sbom-${JOB_NAME.replaceAll('[^a-zA-Z0-9_.-]', '_')}"
|
|
21
30
|
|
|
22
|
-
MAJOR_VERSION =
|
|
23
|
-
MINOR_VERSION =
|
|
31
|
+
MAJOR_VERSION = "${MAJOR_VERSION_PY312}"
|
|
32
|
+
MINOR_VERSION = "${MINOR_VERSION_PY312}"
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
stages {
|
|
27
36
|
stage('Catch build termination') {
|
|
28
37
|
agent {
|
|
29
38
|
node {
|
|
30
|
-
label '
|
|
39
|
+
label 'pre-build'
|
|
31
40
|
customWorkspace "${PATH_HOME}/${JOB_NAME}"
|
|
32
41
|
}
|
|
33
42
|
}
|
|
@@ -96,7 +105,7 @@ pipeline {
|
|
|
96
105
|
// - docker: /root/test-reports
|
|
97
106
|
// - host : /tmp/_${JOB_NAME}/test-reports
|
|
98
107
|
dockerfile {
|
|
99
|
-
label '
|
|
108
|
+
label 'docker-build'
|
|
100
109
|
customWorkspace "${PATH_HOME}/${JOB_NAME}"
|
|
101
110
|
filename 'Dockerfile'
|
|
102
111
|
args "-u root --privileged -v /tmp/_${JOB_NAME}/test-reports:${TEST_REPORT_DIR}"
|
|
@@ -130,6 +139,8 @@ pipeline {
|
|
|
130
139
|
steps {
|
|
131
140
|
// remove any previous folder dist
|
|
132
141
|
sh 'rm -rf dist'
|
|
142
|
+
// remove any previous files used for sbom
|
|
143
|
+
sh 'rm -f sbom*.json trivy*.html syft trivy'
|
|
133
144
|
// pull recent updates of file __init__.py
|
|
134
145
|
withCredentials([gitUsernamePassword(credentialsId: 'bitbucket-user', gitToolName: 'git-tool')]) {
|
|
135
146
|
sh 'git config --global pull.rebase false'
|
|
@@ -169,16 +180,16 @@ pipeline {
|
|
|
169
180
|
agent {
|
|
170
181
|
docker {
|
|
171
182
|
image 'alpine:3.19'
|
|
172
|
-
label '
|
|
183
|
+
label 'docker-build'
|
|
173
184
|
customWorkspace "${PATH_HOME}/${JOB_NAME}"
|
|
174
|
-
args "-u 0"
|
|
185
|
+
args "-u 0 -v ${PATH_HOME}/.cache/trivy:/root/.cache/trivy"
|
|
175
186
|
}
|
|
176
187
|
}
|
|
177
188
|
|
|
178
189
|
stages {
|
|
179
190
|
stage('Generate SBOM') {
|
|
180
191
|
steps {
|
|
181
|
-
sh
|
|
192
|
+
sh """
|
|
182
193
|
apk add --no-cache curl
|
|
183
194
|
|
|
184
195
|
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b . v${SYFT_VERSION}
|
|
@@ -191,36 +202,41 @@ pipeline {
|
|
|
191
202
|
--exclude '**/sbom.spdx.json' \
|
|
192
203
|
--source-name "${JOB_NAME}" \
|
|
193
204
|
--source-version "${BUILD_NUMBER}" \
|
|
194
|
-
-o cyclonedx-json
|
|
195
|
-
-o spdx-json
|
|
205
|
+
-o cyclonedx-json=${SBOM_PROJECT_NAME}.cdx.json \
|
|
206
|
+
-o spdx-json=${SBOM_PROJECT_NAME}.spdx.json
|
|
196
207
|
|
|
197
208
|
rm -f ./syft
|
|
198
|
-
|
|
209
|
+
"""
|
|
199
210
|
}
|
|
200
211
|
}
|
|
201
212
|
|
|
202
213
|
stage('Analyse SBOM') {
|
|
203
214
|
steps {
|
|
204
|
-
sh
|
|
215
|
+
sh """
|
|
205
216
|
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b . v${TRIVY_VERSION}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
./trivy sbom
|
|
211
|
-
--
|
|
217
|
+
if [ ! -f trivy-html-template.tpl ]; then
|
|
218
|
+
curl -L https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/html.tpl -o trivy-html-template.tpl
|
|
219
|
+
fi
|
|
220
|
+
|
|
221
|
+
./trivy sbom ${SBOM_PROJECT_NAME}.cdx.json \
|
|
222
|
+
--cache-dir "/root/.cache/trivy" \
|
|
223
|
+
--severity HIGH,CRITICAL \
|
|
224
|
+
--exit-code 1 \
|
|
225
|
+
--no-progress \
|
|
212
226
|
--format template \
|
|
213
227
|
--template "@trivy-html-template.tpl" \
|
|
214
|
-
-o trivy-report.html
|
|
228
|
+
-o trivy-report-${SBOM_PROJECT_NAME}.html || EXIT_CODE=\$?
|
|
215
229
|
|
|
216
230
|
rm -f ./trivy
|
|
217
|
-
|
|
231
|
+
|
|
232
|
+
exit \${EXIT_CODE:-0}
|
|
233
|
+
"""
|
|
218
234
|
}
|
|
219
235
|
}
|
|
220
236
|
|
|
221
237
|
stage('Archive SBOM & analysis') {
|
|
222
238
|
steps {
|
|
223
|
-
archiveArtifacts artifacts: 'sbom*.json, trivy*.html', fingerprint: true
|
|
239
|
+
archiveArtifacts artifacts: 'sbom*.json, trivy*.html', excludes: 'sbom.cdx.json, sbom.spdx.json', fingerprint: true
|
|
224
240
|
}
|
|
225
241
|
}
|
|
226
242
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyannotators-patterns
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.6.25
|
|
4
4
|
Summary: Annotator based on Presidio pattern recognizer
|
|
5
5
|
Project-URL: Homepage, https://github.com/oterrier/pyannotators_patterns/
|
|
6
6
|
Author-email: Olivier Terrier <olivier.terrier@kairntech.com>
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/src/pyannotators_patterns/patterns.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyannotators_patterns-0.6.23 → pyannotators_patterns-1.6.25}/tests/data/coords-document.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|