Conversation
Summary of ChangesHello @a2as-team, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates an A2AS certificate into the repository, significantly enhancing the transparency and security posture of the agent. By adopting this open standard, the project provides a clear, machine-readable, and human-readable declaration of the agent's design, including its operational boundaries, actions, and resource utilization. This strategic addition is intended to build greater trust with contributors and users by explicitly defining the agent's behavior, all without altering any existing functional code. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces an A2AS certificate to improve transparency and security, focusing on the a2as.yaml manifest. A medium-severity prompt injection vulnerability was identified in the content_summariser_agent where untrusted file content is directly embedded into the agent's prompt, potentially allowing manipulation of generated summaries. It is recommended to update the prompt to better isolate untrusted content. Furthermore, the review highlighted a critical error with the certificate's issuance date, potential security concerns with a declared environment variable, and inconsistencies in types, naming, and file action declarations affecting maintainability and reliability.
| src/llms_gen_agent/sub_agents/doc_summariser/agent.py, src/llms_gen_agent/sub_agents/doc_summariser/tools.py, src/llms_gen_agent/tools.py] | ||
| issued: | ||
| by: A2AS.org | ||
| at: '2026-02-11T16:40:20Z' |
| current_config: llms_gen_agent.config.current_config | ||
| dataclass: dataclasses.dataclass | ||
| discover_files: tools.discover_files | ||
| document_summariser_agent: agent.document_summariser_agent |
There was a problem hiding this comment.
The import path agent.document_summariser_agent is ambiguous and likely incorrect. The project contains multiple agent.py files within the specified scope. This will likely cause issues for any tool that relies on this certificate for static analysis or dependency tracking. Please provide a full, unambiguous Python import path, for example llms_gen_agent.sub_agents.doc_summariser.document_summariser_agent.
| key: | ||
| type: env | ||
| params: | ||
| caller: [os.environ.get] | ||
| path: [find_dotenv()] |
There was a problem hiding this comment.
The manifest declares that the agent reads an environment variable named key. This name is very generic and could potentially refer to a sensitive credential (like an API key). While transparency is the goal of A2AS, declaring a generic name like key can be a security risk if it encourages developers to use insecure variable names. Furthermore, this variable does not appear to be used anywhere in the provided source code, making its presence here suspicious. Please clarify the purpose of this variable or remove it if it's not needed. If it is a secret, consider a more specific name (e.g., THIRD_PARTY_API_KEY) to reduce ambiguity.
| instruction: [You are an expert summariser., Your task is to summarise EACH individual file's content in no more than | ||
| four sentences., 'The summary should reference any key concepts, classes, best practices, etc.', '- Do NOT start | ||
| summaries with text like "This document is about..." or "This page introduces..."', Just immediately describe the | ||
| content. E.g., '- Rather than this: "This document explains how to configure streaming behavior..."', 'Say this: | ||
| "Explains how to configure streaming behavior..."', '- Rather than this: "This page introduces an agentic framework | ||
| for..."', 'Say this: "Introduces an agentic framework for..."', '- If you cannot generate a meaningful summary, | ||
| use ''No meaningful summary available.'' as its summary.', 'The final output MUST be a JSON object with a single | ||
| top-level key called ''batch_summaries'',', which contains a dictionary of file paths to summaries., 'IMPORTANT: | ||
| Your final response MUST contain ONLY this JSON object.', 'DO NOT include any other text, explanations, or markdown | ||
| code block delimiters.', 'FILE CONTENTS START:', '{files_content}', '---', 'FILE CONTENTS END:', Now return the | ||
| JSON object.] |
There was a problem hiding this comment.
The instruction for the content_summariser_agent directly concatenates raw file content into the prompt using the {files_content} placeholder. This creates a prompt injection vulnerability. If the agent processes a file containing malicious instructions (e.g., 'IGNORE ALL PREVIOUS INSTRUCTIONS...'), an attacker could hijack the agent's behavior, leading to the generation of false or misleading summaries. Untrusted input from files should be clearly separated from the core prompt instructions to mitigate this risk.
| params: | ||
| name: batch_processing_loop | ||
| description: Processes all file batches in a loop. | ||
| max_iterations: "200" |
There was a problem hiding this comment.
The value for max_iterations is specified as a string "200". In the corresponding Python code (src/llms_gen_agent/sub_agents/doc_summariser/agent.py, line 221), this is an integer. While YAML parsers might handle this, it's better to use the correct type to avoid potential issues. The same applies to other numeric values like temperature, top_p, and max_output_tokens which are also quoted as strings. Please represent numeric values as numbers, not strings.
max_iterations: 200| type: instance | ||
| models: [config.model] | ||
| params: | ||
| name: content_summarizer_agent |
There was a problem hiding this comment.
There's an inconsistency in the naming of content_summariser_agent. The agent key is content_summariser_agent (with 's'), but its name parameter is content_summarizer_agent (with 'z'). For consistency with the agent key and the prevalent spelling in the project, it's recommended to use the 's' spelling.
name: content_summariser_agent| instruction: [You are an expert in analyzing code repositories and generating `llms.txt` files., Your goal is to create | ||
| a comprehensive and accurate `llms.txt` file that will help other LLMs, 'understand the repository. When the user | ||
| asks you to generate the file, you should ask for the', 'absolute path to the repository/folder, and optionally | ||
| an output path.', 'Here''s the detailed process you should follow:', '1. **Discover Files**: Use the `discover_files` | ||
| tool with the provided `repo_path` to get a list of all', 'relevant files paths, in the return value `files`.', |
There was a problem hiding this comment.
The instruction for this agent is split into a list of strings, with some sentences broken across multiple list items. This can harm readability and might be misinterpreted by the agent framework. It's better to have each list item be a complete, self-contained instruction or paragraph. Consider using YAML's literal block scalar (|) to preserve the multi-line string as it is in the source code, which would improve readability and maintainability.
| llms.txt: | ||
| type: pattern | ||
| actions: [read] | ||
| params: | ||
| caller: [os.path.join] | ||
| pattern: [temp_dir, llms.txt] |
There was a problem hiding this comment.
This entry for llms.txt declares a read action, but the agent's purpose is to write to this file. The write action is correctly declared for the llms_txt_path variable on line 495. This llms.txt entry is redundant and incorrect, which can be confusing. I recommend removing this entry to avoid ambiguity.
Add A2AS Certificate for Agent Transparency and Security
Summary
This PR adds an agent certificate using the A2AS format - an open standard for agentic AI security. The certificate declares operational boundaries, agentic actions, and resources. It acts as a transparency artifact for your agent.
This repository has been certified and added to the registry.
Info and visualization available via the link or badge:
A2AS.org/certified/agents/derailed-dash/llms-generator
About A2AS Certificates
A2AS certificates are declarative manifests for agent behavior. They describe what an agent is designed to do:
Certificates are human-readable and machine-readable, and can be used as a transparency and security artifact.
The A2AS standard is a project from the A2AS.org initiative led by experts from big tech and security companies.
Benefits For This Project
This A2AS certificate can help to:
What This PR Does
This PR doesn't change any code:
a2as.yamlto the repository rootOptional Next Steps
When the agent changes, the A2AS certificate is expected to be updated.
A2AS project maintainers can help with updating the certificate as your agent evolves.
If you find this relevant, you can add the A2AS Shield to your README.md file: