Skip to content

Commit

Permalink
Merge branch 'bugfix/mask_header_session' into 'develop'
Browse files Browse the repository at this point in the history
Mask header session id

See merge request core/sevenbridges-python!105
  • Loading branch information
Djordje Zunic committed Jul 11, 2023
2 parents 2ad4478 + 8ecbe99 commit 28ce330
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ stages:
- pytest --verbose --cov-config setup.cfg
artifacts:
paths:
- coverage_report/*
- test-report/*
coverage: '/TOTAL.*\s+(\d+\%)/'

# Test with python 3.6
test:3.6:
Expand Down Expand Up @@ -44,3 +45,5 @@ sonar:
allow_failure: true
dependencies:
- test:3.9
rules:
- when: always
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[tool:pytest]
addopts =
--cov=sevenbridges
--cov-report=xml:coverage_report/coverage.xml
--cov-report=html:test-report/htmlcov
--cov-report=xml:test-report/coverage.xml
--cov-report=term

[run]
Expand Down
1 change: 1 addition & 0 deletions sevenbridges/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def config_vars(profiles, advance_access):
def mask_secrets(request_data):
masked = copy.deepcopy(request_data)
masked['headers']['X-SBG-Auth-Token'] = '*****'
masked['headers']['X-SBG-Session-Id'] = '*****'
return masked


Expand Down
4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ sonar.projectKey=sevenbridges
sonar.projectName=sevenbridges-python

sonar.sources=sevenbridges
sonar.exclusions=tests/**/*.py,coverage_report/*.xml
sonar.exclusions=tests/**/*.py,test-report/*.xml

sonar.test=tests/**/*.py

sonar.python.coverage.reportPaths=coverage_report/coverage.xml
sonar.python.coverage.reportPaths=test-report/coverage.xml
sonar.coverage.exclusions=tests/*

sonar.issue.ignore.multicriteria=r1
Expand Down

0 comments on commit 28ce330

Please sign in to comment.