Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
csa-ai-foundation-model-api-clients
Advanced tools
Cloud Security Alliance AI Foundation Model API Clients
You can get this library at https://pypi.org/project/csa-ai-foundation-model-api-clients/ or via:
pip install csa-ai-foundation-model-api-clients
This Python library (csa_ai_foundation_model_api_clients) provides API access to text completions for:
and has plans to add:
You can set the following options:
and has plans to add:
Please note this code does not have tests, or good error handling, but it works. Also with respect to handling rate limiting that is on the todo, but currently if you use this tool put a sleep statement to slow it down.
The code will be looking for the API key as an env variable:
Using this as a library:
#!/usr/bin/env python3
from csa_ai_foundation_model_api_clients import FoundationModelAPIClient
def main():
model = 'claude'
system_prompt = "You are a helpful assistant who answers in rhyme."
user_prompt = "What is the capital of "
user_data = "France?"
output_file = 'claude-response.json'
FoundationModelAPIClient(
model=model,
system_prompt=system_prompt,
system_prompt_type="text",
user_prompt=user_prompt,
user_prompt_type="text",
user_data=user_data,
user_data_type="text",
temperature=0.7,
max_tokens=100,
output_file=output_file
)
if __name__ == '__main__':
main()
Using this as a command line tool by calling it as a module (please note all prompts MUST be files currently when used as a command line tool):
python3 -m csa_ai_foundation_model_api_clients.csa_ai_foundation_model_api_clients \
--model chatgpt \
--system system-prompt.txt \
--user-prompt user-prompt.txt \
--user-data user-data.txt \
--output output.json \
--temperature 0.9 \
--max_tokens 2000
FAQs
Cloud Security Alliance AI Foundation Model API Clients
We found that csa-ai-foundation-model-api-clients demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.