Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v7.3.0-21-gd03545f
_commit: v8.2.0
_src_path: gh:eccenca/cmem-plugin-template
author_mail: [email protected]
author_name: eccenca GmbH
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
- name: Check out repository
uses: actions/checkout@v5

- name: Cache Trivy DB
id: cache-trivydb
uses: actions/cache@v4
with:
path: .trivycache
key: ${{ runner.os }}-trivydb

- name: Install Task
uses: arduino/setup-task@v2

Expand Down Expand Up @@ -61,9 +68,13 @@ jobs:
run: |
task check:deptry

- name: safety
- name: trivy
env:
TRIVY_NO_PROGRESS: "true"
TRIVY_CACHE_DIR: ".trivycache/"
TRIVY_DISABLE_VEX_NOTICE: "true"
run: |
task check:safety
task check:trivy

- name: Publish Test Report in Action
uses: mikepenz/action-junit-report@v4
Expand Down
13 changes: 10 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,24 @@ deptry:
script:
- task check:deptry

safety:
trivy:
stage: test
variables:
TRIVY_NO_PROGRESS: "true"
TRIVY_CACHE_DIR: ".trivycache/"
TRIVY_DISABLE_VEX_NOTICE: "true"
script:
- task check:safety
- task check:trivy
cache:
paths:
- .trivycache/

build:
stage: build
needs:
- mypy
- pytest
- safety
- trivy
- deptry
script:
- task build
Expand Down
2 changes: 1 addition & 1 deletion .idea/cmem-plugin-ssh.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
default_language_version:
python: python3.13

repos:
- repo: local
hooks:
Expand Down Expand Up @@ -36,3 +39,9 @@ repos:
stages: [post-checkout, post-merge]
always_run: true

- id: trivy
name: check:trivy
description: run trivy to scan for vulnerabilities
entry: task check:trivy
language: python
pass_filenames: false
4 changes: 4 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .trivyignore

# ignore 51358 safety - dev dependency only
CVE-2022-39280
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/)

## [1.1.1]

### Fixed

- autocompletion for folders works now for case-sensitive folders (example: test and TEst)

## [1.1.0] 2025-10-20

### Fixed
Expand Down
16 changes: 11 additions & 5 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ includes:
custom:
taskfile: ./TaskfileCustom.yaml
optional: true
flatten: true
plugin:
taskfile: .tasks-plugin.yml
optional: true
flatten: true

tasks:

Expand Down Expand Up @@ -110,7 +112,7 @@ tasks:
- task: check:ruff
- task: check:mypy
- task: check:deptry
- task: check:safety
- task: check:trivy

check:pytest:
desc: Run unit and integration tests
Expand Down Expand Up @@ -152,12 +154,16 @@ tasks:
vars:
JUNIT_FILE: ./{{.DIST_DIR}}/junit-mypy.xml

check:safety:
desc: Complain about vulnerabilities in dependencies
check:trivy:
desc: Scan for vulnerabilities using Trivy
<<: *preparation
cmds:
# ignore 51358 safety - dev dependency only
- poetry run safety check -i 51358
- >
poetry run trivy fs
--include-dev-deps
--scanners vuln
--exit-code 1
.

check:deptry:
desc: Complain about unused or missing dependencies
Expand Down
10 changes: 10 additions & 0 deletions cmem_plugin_ssh/autocompletion.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ def __init__(
"path",
]

def autocomplete_query(
self, query: str, depend_on_parameter_values: list[Any], context: PluginContext
) -> list[Autocompletion]:
"""Search for autocompletions based on a query string.

Override to preserve case sensitivity for accurate folder matching.
"""
terms = [query for query in query.split() if query.strip()]
return self.autocomplete(terms, depend_on_parameter_values, context)

def autocomplete(
self,
query_terms: list[str],
Expand Down
1,471 changes: 766 additions & 705 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ pytest-dotenv = "^0.5.2"
pytest-html = "^4.1.1"
pytest-memray = { version = "^1.8.0", markers = "platform_system != 'Windows'" }
ruff = "^0.13.3"
safety = "^1.10.3"
testcontainers = "^4.12.0"
types-paramiko = "^3.5.0.20250516"
trivy-py-ecc = "^0.67.2"

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
Expand Down