Skip to content

Secret Masking Model #80

Description

@rlucatoor

What is a Secret Masking model

A Secret Masking model removes secrets and other sensitive information from code, while preserving its overall functioning. This is done by replacing secrets with placeholder values, ensuring that the code remains coherent and usable without compromising privacy. This can be thought of as a special case of a Text Anonymization model.

What needs to be done

Implement a Secret Masking model that exposes the following public methods:

.train() method:

.train(output_path: Optional[str] = None, num_samples: int = config.DEFAULT_SYNTHEX_DATAPOINT_NUM, num_epochs: int = 3)

The method should train the model to swap sensitive information in code with placeholder values.

.__call__(code: str)

Given an input code, this method will replace all sensitive information, if any, with placeholder values

For instance, given the input:

__call__("artifex = Artifex(api_key='abc123456789')")

The model might return:

"artifex = Artifex(api_key='[MASKED]')"

Important

The new Secret Masking model should have the same structure as the Text Anonymization model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needednew modelRequest for a new model implementation

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions