Skip to content

Feat/asharp model #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025
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
9 changes: 8 additions & 1 deletion .github/workflows/ash-build-and-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,18 @@ jobs:
steps:
- uses: actions/checkout@v4


- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
cache: 'poetry'

- name: Install Poetry
run: |
pipx install poetry==2.1.2
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true

- name: Install dependencies
run: pip install -r requirements.txt
Expand Down
4 changes: 4 additions & 0 deletions docs/content/docs/development/api/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: API Reference
nav:
- Overview: README.md
- ...
491 changes: 491 additions & 0 deletions docs/content/docs/development/api/README.md

Large diffs are not rendered by default.

132 changes: 132 additions & 0 deletions docs/content/docs/development/api/base.converter_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<!-- markdownlint-disable -->

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/converter_plugin.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

# <kbd>module</kbd> `base.converter_plugin`
Module containing the ConverterPlugin base class.



---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/converter_plugin.py#L13"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ConverterPluginConfigBase`





---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.




---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/converter_plugin.py#L20"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ConverterPluginBase`
Base converter plugin with some methods of the IConverter abstract class implemented for convenience.


---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.



---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/converter_plugin.py#L51"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `configure`

```python
configure(config: ConverterPluginConfigBase | None = None) → None
```

Configure the converter with provided configuration.

---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/converter_plugin.py#L64"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `convert`

```python
convert(target: Path | str) → List[Path]
```

Execute the converter on the target prior to scans.

Returns the list of Path objects emitted by the `convert()` operation that correspond to scannable files emitted to the work_dir.

---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/converter_plugin.py#L35"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `setup_paths`

```python
setup_paths() → Self
```

Set up default paths and initialize plugin configuration.

---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/converter_plugin.py#L59"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>method</kbd> `validate`

```python
validate() → bool
```

Validate converter configuration and requirements.




---

_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._
16 changes: 16 additions & 0 deletions docs/content/docs/development/api/base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- markdownlint-disable -->

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/__init__.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

# <kbd>module</kbd> `base`








---

_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._
148 changes: 148 additions & 0 deletions docs/content/docs/development/api/base.options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<!-- markdownlint-disable -->

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/options.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

# <kbd>module</kbd> `base.options`






---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/options.py#L4"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `BuilderOptionsBase`
Base class for builder options.


---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.




---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/options.py#L10"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ConverterOptionsBase`
Base class for converter options.


---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.




---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/options.py#L16"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ScannerOptionsBase`
Base class for scanner options.


---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.




---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/options.py#L22"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `ReporterOptionsBase`
Base class for reporter options.


---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.






---

_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._
49 changes: 49 additions & 0 deletions docs/content/docs/development/api/base.plugin_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!-- markdownlint-disable -->

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/plugin_config.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

# <kbd>module</kbd> `base.plugin_config`






---

<a href="https://github.com/example/my-project/blob/main/src/automated_security_helper/base/plugin_config.py#L10"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `PluginConfigBase`
Base converter configuration model with common settings.


---

#### <kbd>property</kbd> model_extra

Get extra fields set during validation.



**Returns:**
A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.

---

#### <kbd>property</kbd> model_fields_set

Returns the set of fields that have been explicitly set on this model instance.



**Returns:**
A set of strings representing the fields that have been set, i.e. that were not filled from defaults.






---

_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._
Loading
Loading