agentseal 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. agentseal-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +36 -0
  2. agentseal-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  3. agentseal-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +17 -0
  4. agentseal-0.2.0/.gitignore +37 -0
  5. agentseal-0.2.0/CONTRIBUTING.md +108 -0
  6. agentseal-0.2.0/LICENSE +122 -0
  7. agentseal-0.2.0/PKG-INFO +517 -0
  8. agentseal-0.2.0/README.md +474 -0
  9. agentseal-0.2.0/agentseal/__init__.py +46 -0
  10. agentseal-0.2.0/agentseal/__main__.py +5 -0
  11. agentseal-0.2.0/agentseal/cache.py +56 -0
  12. agentseal-0.2.0/agentseal/canaries.py +398 -0
  13. agentseal-0.2.0/agentseal/cli.py +1223 -0
  14. agentseal-0.2.0/agentseal/compare.py +138 -0
  15. agentseal-0.2.0/agentseal/connectors/__init__.py +66 -0
  16. agentseal-0.2.0/agentseal/connectors/anthropic.py +39 -0
  17. agentseal-0.2.0/agentseal/connectors/http.py +29 -0
  18. agentseal-0.2.0/agentseal/connectors/litellm.py +34 -0
  19. agentseal-0.2.0/agentseal/connectors/ollama.py +35 -0
  20. agentseal-0.2.0/agentseal/connectors/openai.py +39 -0
  21. agentseal-0.2.0/agentseal/constants.py +61 -0
  22. agentseal-0.2.0/agentseal/detection/__init__.py +28 -0
  23. agentseal-0.2.0/agentseal/detection/canary.py +11 -0
  24. agentseal-0.2.0/agentseal/detection/fusion.py +127 -0
  25. agentseal-0.2.0/agentseal/detection/ngram.py +99 -0
  26. agentseal-0.2.0/agentseal/detection/refusal.py +17 -0
  27. agentseal-0.2.0/agentseal/detection/semantic.py +205 -0
  28. agentseal-0.2.0/agentseal/discovery.py +805 -0
  29. agentseal-0.2.0/agentseal/examples.py +318 -0
  30. agentseal-0.2.0/agentseal/exceptions.py +26 -0
  31. agentseal-0.2.0/agentseal/fingerprint.py +215 -0
  32. agentseal-0.2.0/agentseal/fleet.py +386 -0
  33. agentseal-0.2.0/agentseal/genome.py +816 -0
  34. agentseal-0.2.0/agentseal/mutations.py +197 -0
  35. agentseal-0.2.0/agentseal/probes/__init__.py +14 -0
  36. agentseal-0.2.0/agentseal/probes/base.py +29 -0
  37. agentseal-0.2.0/agentseal/probes/extraction.py +318 -0
  38. agentseal-0.2.0/agentseal/probes/injection.py +443 -0
  39. agentseal-0.2.0/agentseal/probes/loader.py +40 -0
  40. agentseal-0.2.0/agentseal/probes/mcp_tools.py +548 -0
  41. agentseal-0.2.0/agentseal/probes/rag_poisoning.py +518 -0
  42. agentseal-0.2.0/agentseal/py.typed +0 -0
  43. agentseal-0.2.0/agentseal/report.py +1174 -0
  44. agentseal-0.2.0/agentseal/schemas.py +766 -0
  45. agentseal-0.2.0/agentseal/scoring.py +88 -0
  46. agentseal-0.2.0/agentseal/upload.py +120 -0
  47. agentseal-0.2.0/agentseal/validator.py +538 -0
  48. agentseal-0.2.0/pyproject.toml +45 -0
  49. agentseal-0.2.0/tests/__init__.py +0 -0
  50. agentseal-0.2.0/tests/test_imports.py +356 -0
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug or unexpected behavior
4
+ title: "[Bug] "
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Description
10
+
11
+ A clear description of the bug.
12
+
13
+ ## Steps to Reproduce
14
+
15
+ 1. ...
16
+ 2. ...
17
+ 3. ...
18
+
19
+ ## Expected Behavior
20
+
21
+ What you expected to happen.
22
+
23
+ ## Actual Behavior
24
+
25
+ What actually happened. Include error messages or terminal output if available.
26
+
27
+ ## Environment
28
+
29
+ - OS: [e.g. macOS 15, Ubuntu 24.04, Windows 11]
30
+ - Python version: [e.g. 3.12.4]
31
+ - AgentSeal version: [e.g. 0.2.0 - run `pip show agentseal`]
32
+ - Model used: [e.g. gpt-4o, ollama/llama3.1:8b]
33
+
34
+ ## Additional Context
35
+
36
+ Any other context, screenshots, or log output.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or improvement
4
+ title: "[Feature] "
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Problem
10
+
11
+ What problem does this feature solve? Describe the use case.
12
+
13
+ ## Proposed Solution
14
+
15
+ How should this work? Be as specific as possible.
16
+
17
+ ## Alternatives Considered
18
+
19
+ Have you considered other approaches? Why is this one preferred?
20
+
21
+ ## Additional Context
22
+
23
+ Any mockups, examples, or references.
@@ -0,0 +1,17 @@
1
+ ## Summary
2
+
3
+ Brief description of what this PR does and why.
4
+
5
+ ## Changes
6
+
7
+ - ...
8
+ - ...
9
+
10
+ ## Test Plan
11
+
12
+ - [ ] Tests pass (`python -m pytest tests/ -v`)
13
+ - [ ] Manual testing done (describe below)
14
+
15
+ ## Related Issues
16
+
17
+ Closes #
@@ -0,0 +1,37 @@
1
+ # Environment
2
+ .env
3
+ .env.local
4
+ .env.production
5
+
6
+ # Python
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+ *.egg-info/
11
+ dist/
12
+ build/
13
+ .eggs/
14
+ *.egg
15
+ .venv/
16
+ venv/
17
+
18
+ # IDE
19
+ .vscode/
20
+ .idea/
21
+ *.swp
22
+ *.swo
23
+
24
+ # OS
25
+ .DS_Store
26
+ Thumbs.db
27
+
28
+ # Testing
29
+ .coverage
30
+ htmlcov/
31
+ .pytest_cache/
32
+
33
+ # Generated reports
34
+ *.pdf
35
+
36
+ # AgentSeal local config
37
+ .agentseal/
@@ -0,0 +1,108 @@
1
+ # Contributing to AgentSeal
2
+
3
+ Thank you for your interest in contributing! This guide covers how to set up your development environment, our code style, and the pull request process.
4
+
5
+ ---
6
+
7
+ ## Getting Started
8
+
9
+ ### Prerequisites
10
+
11
+ - Python 3.10+
12
+ - Git
13
+
14
+ ### Setup
15
+
16
+ ```bash
17
+ # Clone the repository
18
+ git clone https://github.com/agentseal/agentseal.git
19
+ cd agentseal
20
+
21
+ # Create a virtual environment
22
+ python3 -m venv .venv
23
+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
24
+
25
+ # Install in development mode
26
+ pip install -e "./agentseal[all]"
27
+
28
+ # Run the tests
29
+ cd agentseal
30
+ python -m pytest tests/ -v
31
+ ```
32
+
33
+ ### Verify it works
34
+
35
+ ```bash
36
+ agentseal scan --prompt "You are a test assistant" --model ollama/llama3.1:8b
37
+ ```
38
+
39
+ ---
40
+
41
+ ## What can I contribute?
42
+
43
+ ### New attack probes
44
+
45
+ The probes are defined in `agentseal/agentseal/probes/`. If you've found a new attack technique that AgentSeal doesn't test for, we'd love to add it.
46
+
47
+ ### Better detection
48
+
49
+ Detection methods are in `agentseal/agentseal/detection/`. Improvements to n-gram matching, canary detection, or new detection approaches are welcome.
50
+
51
+ ### New connectors
52
+
53
+ Model connectors are in `agentseal/agentseal/connectors/`. If you use a provider we don't support, add a connector for it.
54
+
55
+ ### Bug fixes
56
+
57
+ Found a bug? Fix it and submit a PR. If you're not sure how to fix it, open an issue first.
58
+
59
+ ---
60
+
61
+ ## Code Style
62
+
63
+ - **Python**: Follow PEP 8.
64
+ - **Line length**: 100 characters max.
65
+ - **Type hints**: Use type annotations for function signatures.
66
+ - **Docstrings**: Required for public classes and functions.
67
+
68
+ ---
69
+
70
+ ## Pull Request Process
71
+
72
+ 1. **Fork** the repository and create a branch from `main`:
73
+ ```bash
74
+ git checkout -b feat/your-feature
75
+ ```
76
+
77
+ 2. **Make your changes** with clear, focused commits.
78
+
79
+ 3. **Write tests** for new functionality.
80
+
81
+ 4. **Push** your branch and open a pull request against `main`.
82
+
83
+ 5. **Describe** your changes in the PR:
84
+ - What does this change?
85
+ - How was it tested?
86
+ - Any breaking changes?
87
+
88
+ ### Commit messages
89
+
90
+ Use clear, imperative-mood messages:
91
+
92
+ - `Add Unicode homoglyph detection for extraction probes`
93
+ - `Fix n-gram scoring for short prompts`
94
+ - `Add Google Gemini connector`
95
+
96
+ ---
97
+
98
+ ## Reporting Issues
99
+
100
+ - Use [GitHub Issues](https://github.com/agentseal/agentseal/issues) for bugs and feature requests.
101
+ - Include reproduction steps, expected vs actual behavior.
102
+ - For security vulnerabilities, please email hello@agentseal.org instead of opening a public issue.
103
+
104
+ ---
105
+
106
+ ## License
107
+
108
+ By contributing, you agree that your contributions will be licensed under the [FSL-1.1-Apache-2.0](LICENSE) license.
@@ -0,0 +1,122 @@
1
+ # Functional Source License, Version 1.1, Apache 2.0 Future License
2
+
3
+ ## Abbreviation
4
+
5
+ FSL-1.1-Apache-2.0
6
+
7
+ ## Notice
8
+
9
+ Copyright 2026 AgentSeal
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the Apache License, Version 2.0 that is effective on the second anniversary of
91
+ the date we make the Software available. On or after that date, you may use the
92
+ Software under the Apache License, Version 2.0, in which case the following
93
+ will apply:
94
+
95
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96
+ this file except in compliance with the License.
97
+
98
+ You may obtain a copy of the License at
99
+
100
+ http://www.apache.org/licenses/LICENSE-2.0
101
+
102
+ Unless required by applicable law or agreed to in writing, software distributed
103
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
105
+ specific language governing permissions and limitations under the License.
106
+
107
+ ## License Details
108
+
109
+ License: Functional Source License, Version 1.1, Apache 2.0 Future License
110
+
111
+ Licensor: AgentSeal
112
+
113
+ Licensed Work: AgentSeal AI Security Scanner
114
+ The Licensed Work is (c) 2026 AgentSeal
115
+
116
+ Change Date: Two years from the date the Licensed Work is published, or
117
+ February 26, 2028, whichever comes first.
118
+
119
+ Change License: Apache License, Version 2.0
120
+
121
+ For information about alternative licensing arrangements, please contact:
122
+ hello@agentseal.org