secret_guard: .dart/.kt missing from _SOURCE_SUFFIXES — Dart/Kotlin sources are pattern-redacted and stop compiling
Los mantenedores suelen responder en 4 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- security, testing-qa
Línea de trabajo
Comienza en argus_skill/core/secret_guard.py leyendo _SOURCE_SUFFIXES y scrub_recent_text_artifacts, especialmente la comprobación de include_patterns alrededor de la línea 848. Añade cobertura de regresión para expresiones inline privateKey: y apiKey: en archivos .dart y .kt, y confirma que los patrones equivalentes siguen ocultándose en artefactos .env o .json.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The round secret guard (argus_skill/core/secret_guard.py) rewrites inline "secret" patterns in artifacts changed during a round. Source-code files listed in _SOURCE_SUFFIXES are exempt from this pattern redaction, but .dart and .kt are missing from that set. Ordinary Dart/Kotlin expressions such as privateKey: this.privateKey are therefore rewritten in place to privateKey: <REDACTED:secret> at the end of a round, and sources stop compiling.
The rewrite is silent (in-place, no backup) and happens after the Engineer has validated the tree, so the build breaks between rounds and the next round inherits a broken tree.
Impact
- Any Flutter/Dart or Android/Kotlin project managed by Argus gets its changed sources corrupted whenever an ordinary
privateKey:/apiKey:/clientSecret:expression is present. - Observed on
argus-skill 0.1.1(installed frommain), macOS: 33 occurrences across 9 changed.dart/.ktfiles in a single round, re-applied after the agent restored the identifiers (the guard runs every round on git-changed files). - The false positive is systematic for mobile code:
privateKeyis a normal identifier in Dart/Kotlin, not a secret literal.
Root cause
argus_skill/core/secret_guard.py, _SOURCE_SUFFIXES (~line 180):
_SOURCE_SUFFIXES = {
".c",
".cc",
".cpp",
".cue",
".go",
".h",
".hpp",
".java",
".js",
".jsx",
".py",
".rs",
".sh",
".ts",
".tsx",
}
Used at ~line 848:
include_patterns = (
not known_secret_only
and path.suffix.casefold() not in _SOURCE_SUFFIXES
)
Files whose suffix is not in the set are pattern-redacted; Dart and Kotlin are not listed.
Minimal reproduction
Temp tree (no git repo → mtime path), a.dart contains:
class ServerConfig {
final String privateKey;
ServerConfig copy() => ServerConfig(privateKey: this.privateKey);
}
.env contains PRIVATE_KEY=0123456789abcdef (positive control). Call
scrub_recent_text_artifacts(tmp, modified_since=time.time() - 60).
Actual — upstream main@746f76b7a7:
changed: True replacements: 2 files: ('.env', 'a.dart')
a.dart: ... ServerConfig(privateKey: <REDACTED:secret>; <- broken: ')' consumed
.env : PRIVATE_KEY= <REDACTED:secret> <- intended
With .dart added to _SOURCE_SUFFIXES:
changed: True replacements: 1 files: ('.env',)
a.dart: ... ServerConfig(privateKey: this.privateKey); <- untouched
.env : PRIVATE_KEY= <REDACTED:secret> <- intended
Proposed fix
_SOURCE_SUFFIXES = {
".c",
".cc",
".cpp",
".cue",
+ ".dart",
".go",
".h",
".hpp",
".java",
".js",
".jsx",
+ ".kt",
".py",
".rs",
".sh",
".ts",
".tsx",
}
(Optionally .kts for Kotlin scripts.)
Suggested regression test
Assert that scrub_recent_text_artifacts leaves inline privateKey: / apiKey: expressions untouched in .dart and .kt files, while still redacting the same patterns in non-source artifacts (e.g. .env, .json).
Environment
argus-skill 0.1.1, installed frommainzip, macOS (Darwin 25.6, arm64), Python 3.12.13- Verified on upstream
main@746f76b7a7(raw file still lacks.dart/.kt); the preview repo (lbx154/Argus,main) shows the same set.
- Lenguaje dominante
- Python
- Estrellas
- 132
- Forks
- 19
- Merge medio
- 11 h 5 min
- PR fusionados (30 d)
- 2
Preparar el entorno
Aún no hemos revisado los archivos de configuración de este proyecto. Empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/ArgusAgent
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
microsoft/ArgusAgent#32 ·
Los mantenedores suelen responder en 4 días
Todos los issues de microsoft/ArgusAgent
Issues similares
-
pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pydantic/pydantic-ai#8843 ·
Los mantenedores suelen responder en 1 día
-
breaking change enhancement server
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
sktime/sktime#11310 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día