Skip to content

Commit

Permalink
Security Center Hosts API Support (#866)
Browse files Browse the repository at this point in the history
* Added Hosts API support

* Added Security Center Hosts API Support #614
  • Loading branch information
SteveMcGrath authored Jan 16, 2025
1 parent ef26d74 commit da0355d
Show file tree
Hide file tree
Showing 11 changed files with 630 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/snyk_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test --command=python3 --skip-unresolved=true
command: monitor --command=python3 --skip-unresolved=true
23 changes: 10 additions & 13 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,23 @@ jobs:
run: uv run ruff check tenable --exit-zero

- name: Run unit tests
run: uv run pytest --vcr-record=none tests --cov-report=term-missing
run: uv run pytest --vcr-record=none tests --cov-report=term-missing --cov-report=xml:coverage.xml --cov=tenable

- name: Upload Coverage
uses: orgoro/[email protected]
with:
thresholdNew: 0.9
thresholdModified: 0.8
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}

code-assessments:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: astral-sh/setup-uv@v4

- name: Run coverage
run: uv tool run coverage xml coverage.xml

- name: Upload Coverage
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}

python-version: "3.10"
- name: Run pip-audit
run: uv export --format requirements-txt | uv tool run pip-audit

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ Jenkinsfile
/ex_*.py
.idea
/dist
__MACOSX
1 change: 1 addition & 0 deletions docs/api/sc/hosts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. automodule:: tenable.sc.hosts
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,5 @@ dev-dependencies = [

[tool.pytest.ini_options]
addopts = "--cov-report term-missing --cov=tenable"
filterWarnings = [
"ignore::DeprecationWarning"
]
testpaths = ['./tests']
filterwarnings = ["ignore:::DeprecationWarning"]
Loading

0 comments on commit da0355d

Please sign in to comment.