Skip to content

Commit 952bfbb

Browse files
authored
Updates for pushing detect-secrets-stream images to ICR (#201)
* Updating makefile to login to ibmcloud instead of dockerhub and updating skaffold with new image name Signed-off-by: Kristi Kazmierczak <[email protected]> * adding pip command to verify if wheel is present in travis Signed-off-by: Kristi Kazmierczak <[email protected]> * updating pytest dependency to resolve pipenv check vuln Signed-off-by: Kristi Kazmierczak <[email protected]> * adding ignore for wheel vuln and updating another pytest version Signed-off-by: Kristi Kazmierczak <[email protected]> * updating pycqa/flake8 repo to reference github main repo Signed-off-by: Kristi Kazmierczak <[email protected]> * running pre-commit autoupdate Signed-off-by: Kristi Kazmierczak <[email protected]> * files updated from pre-commit run Signed-off-by: Kristi Kazmierczak <[email protected]> * updating detect-secrets version in Pipfile Signed-off-by: Kristi Kazmierczak <[email protected]> Signed-off-by: Kristi Kazmierczak <[email protected]>
1 parent 0bf21ad commit 952bfbb

File tree

8 files changed

+451
-396
lines changed

8 files changed

+451
-396
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jobs:
4848
# If you wish to specify custom queries, you can do so here or in a config file.
4949
# By default, queries listed here will override any specified in a config file.
5050
# Prefix the list here with "+" to use these queries and those in the config file.
51-
51+
5252
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
5353
# queries: security-extended,security-and-quality
5454

55-
55+
5656
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5757
# If this step fails, then you should remove it and run the build manually (see below)
5858
- name: Autobuild
@@ -61,7 +61,7 @@ jobs:
6161
# ℹ️ Command-line programs to run using the OS shell.
6262
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
6363

64-
# If the Autobuild fails above, remove it and uncomment the following three lines.
64+
# If the Autobuild fails above, remove it and uncomment the following three lines.
6565
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
6666

6767
# - run: |

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
3+
rev: v4.4.0
44
hooks:
55
- id: check-builtin-literals
66
args: ['--no-allow-dict-kwargs']
@@ -14,28 +14,28 @@ repos:
1414
- id: debug-statements
1515
- id: double-quote-string-fixer
1616
- id: name-tests-test
17-
- repo: https://gitlab.com/pycqa/flake8
18-
rev: master
17+
- repo: https://github.com/pycqa/flake8
18+
rev: 6.0.0
1919
hooks:
2020
- id: flake8
2121
args: []
2222
exclude: ^test_data/
2323
additional_dependencies: [pep8-naming]
2424
- repo: https://github.com/asottile/reorder_python_imports
25-
rev: v2.6.0
25+
rev: v3.9.0
2626
hooks:
2727
- id: reorder-python-imports
2828
language_version: python3
2929
- repo: https://github.com/asottile/add-trailing-comma
30-
rev: v2.1.0
30+
rev: v2.4.0
3131
hooks:
3232
- id: add-trailing-comma
3333
- repo: https://github.com/pre-commit/mirrors-autopep8
34-
rev: v1.5.7
34+
rev: v2.0.0
3535
hooks:
3636
- id: autopep8
3737
- repo: https://github.com/ibm/detect-secrets
38-
rev: 0.13.1+ibm.34.dss
38+
rev: 0.13.1+ibm.55.dss
3939
hooks:
4040
- id: detect-secrets # pragma: whitelist secret
4141
args: [--baseline, .secrets.baseline, --use-all-plugins, --no-keyword-scan ]

.secrets.baseline

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
"files": "^.secrets.baseline$|^secret|^Pipfile.lock$|^kustomize_envs/.*/secret",
44
"lines": null
55
},
6-
"generated_at": "2021-05-12T20:42:08Z",
6+
"generated_at": "2022-12-13T17:56:28Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
1010
},
1111
{
1212
"name": "ArtifactoryDetector"
1313
},
14+
{
15+
"name": "AzureStorageKeyDetector"
16+
},
1417
{
1518
"base64_limit": 4.5,
1619
"name": "Base64HighEntropyString"
@@ -25,8 +28,12 @@
2528
"name": "CloudantDetector"
2629
},
2730
{
31+
"ghe_instance": "github.ibm.com",
2832
"name": "GheDetector"
2933
},
34+
{
35+
"name": "GitHubTokenDetector"
36+
},
3037
{
3138
"hex_limit": 3,
3239
"name": "HexHighEntropyString"
@@ -43,6 +50,9 @@
4350
{
4451
"name": "MailchimpDetector"
4552
},
53+
{
54+
"name": "NpmDetector"
55+
},
4656
{
4757
"name": "PrivateKeyDetector"
4858
},
@@ -52,6 +62,9 @@
5262
{
5363
"name": "SoftlayerDetector"
5464
},
65+
{
66+
"name": "SquareOAuthDetector"
67+
},
5568
{
5669
"name": "StripeDetector"
5770
},
@@ -126,7 +139,7 @@
126139
}
127140
]
128141
},
129-
"version": "0.13.1+ibm.34.dss",
142+
"version": "0.13.1+ibm.55.dss",
130143
"word_list": {
131144
"file": null,
132145
"hash": null

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
MAKEFLAGS += --warn-undefined-variables
22
SHELL = /bin/bash
33

4+
CONTAINER_REGISTRY = icr.io
5+
IBM_CLOUD_REGION = us-east
6+
47
SKAFFOLD_VERBOSITY ?= info
58

69
TEST_DB_CONTAINER_NAME ?= gd_test_postgres
@@ -131,7 +134,7 @@ ifdef TRAVIS
131134
endif
132135
# ignore 41002: coverage <6.0b1 resolved (5.5 installed)! it's part of pytest-cov
133136
# which does not have a version containing the fix.
134-
pipenv check --ignore 41002
137+
pipenv check --ignore 41002 --ignore 51499
135138
pre-commit run --all-files --show-diff-on-failure
136139

137140
.PHONY: start-db_metrics
@@ -144,14 +147,13 @@ start-scan_worker:
144147

145148
.PHONY: login
146149
login:
147-
ifndef DOCKER_REG_API_KEY
148-
$(error env var DOCKER_REG_API_KEY is not set)
149-
endif
150-
ifndef DOCKER_REG_USERNAME
151-
$(error env var DOCKER_REG_USERNAME is not set)
150+
ifndef IBM_CLOUD_API_KEY
151+
$(error env var IBM_CLOUD_API_KEY is not set)
152152
endif
153+
# login to ibm cloud
154+
@ibmcloud login --apikey $(IBM_CLOUD_API_KEY) -a https://cloud.ibm.com -r $(IBM_CLOUD_REGION)
153155
# login to the docker registry
154-
@echo $(DOCKER_REG_API_KEY) | docker login -u $(DOCKER_REG_USERNAME) --password-stdin
156+
@echo $(IBM_CLOUD_API_KEY) | docker login -u iamapikey --password-stdin $(CONTAINER_REGISTRY)
155157

156158
.PHONY: build-images
157159
build-images:

Pipfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ url = "https://pypi.org/simple"
44
verify_ssl = true
55

66
[dev-packages]
7-
pytest = "==7.1.1"
7+
pytest = "==7.2.0"
88
responses = "==0.20.0"
99
mock = "==4.0.3"
1010
unittest2 = "==1.1.0"
@@ -33,7 +33,8 @@ gunicorn = "==20.1.0"
3333
gevent = "==21.12.0"
3434
pyjwt = "==2.4.0"
3535
ibm-db = "==3.1.1"
36-
detect-secrets = {ref = "0.13.1+ibm.47.dss", git = "https://github.com/ibm/detect-secrets.git"}
36+
detect-secrets = {ref = "0.13.1+ibm.55.dss", git = "https://github.com/ibm/detect-secrets.git"}
37+
pytest = "==7.2.0"
3738

3839
[requires]
3940
python_version = "3.9"

0 commit comments

Comments
 (0)