a-pavithraa/springboot-skills-marketplace / plugins/springboot-architecture/skills/spring-boot-team-harness
spring-boot-team-harness
VerifiedUse when a team wants every developer's coding agent (Claude Code or Codex) to follow the same rules and coding conventions on a Maven or Gradle Spring Boot 4 repository: setting up AGENTS.md, coding standards, guardrails, shared agent settings, or build and CI checks that agents must pass before code merges. It adds ./mvnw verify or ./gradlew build gates that fail on null-safety bugs (NullAway with JSpecify), module-boundary breaches (Spring Modulith), unknown or deprecated Boot property keys, Spring mistakes that compile (ArchUnit) and unformatted code, Claude Code and Codex hooks that run those gates before a turn ends, and a CI workflow.
assets/observability/LogLeakCheck.java
View on GitHubpackage {{TEST_PACKAGE}};
import static org.assertj.core.api.Assertions.fail;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.IThrowableProxy;
import ch.qos.logback.core.read.ListAppender;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.slf4j.LoggerFactory;
/**
* Runs around every test and fails it when the app's own code logs an email address or a credential. Names, phone
* numbers and other identifiers have no reliable shape, so REVIEW.md covers those. Framework logs are left out.
*/
public class LogLeakCheck implements BeforeEachCallback, AfterEachCallback {
private static final String BASE_PACKAGE = "{{BASE_PACKAGE}}";
private static final ExtensionContext.Namespace NAMESPACE = ExtensionContext.Namespace.create(LogLeakCheck.class);
private static final Map<String, Pattern> SENSITIVE = Map.of(
"an email address", Pattern.compile("[\\w.+-]+@[\\w-]+\\.[\\w.-]+"),
"a JWT", Pattern.compile("eyJ[\\w-]+\\.[\\w-]+\\.[\\w-]+"),
"a bearer token", Pattern.compile("(?i)bearer\\s+[\\w.~+/-]{8,}"),
"a credential", Pattern.compile("(?i)(password|passwd|secret|api[_-]?key|token)\\s*[=:]\\s*[^\\s,{}\\[\\]]+"));
@Override
public void beforeEach(ExtensionContext context) {
ListAppender<ILoggingEvent> appender = new ListAppender<>();
appender.start();
root().addAppender(appender);
context.getStore(NAMESPACE).put("appender", appender);
}
@Override
@SuppressWarnings("unchecked")
public void afterEach(ExtensionContext context) {
ListAppender<ILoggingEvent> appender =
(ListAppender<ILoggingEvent>) context.getStore(NAMESPACE).remove("appender");
root().detachAppender(appender);
for (ILoggingEvent event : List.copyOf(appender.list)) {
if (event.getLoggerName().startsWith(BASE_PACKAGE)) {
check(event);
}
}
}
private static void check(ILoggingEvent event) {
String text = text(event);
SENSITIVE.forEach((kind, pattern) -> {
if (pattern.matcher(text).find()) {
fail("%s logged %s. Log an internal id instead, or give the type a toString that leaves the value "
+ "out. Logs are exported as they are: %s", event.getLoggerName(), kind,
event.getMessage());
}
});
}
private static String text(ILoggingEvent event) {
StringBuilder text = new StringBuilder(event.getFormattedMessage());
if (event.getKeyValuePairs() != null) {
event.getKeyValuePairs().forEach(pair -> text.append(' ').append(pair.key).append('=').append(pair.value));
}
for (IThrowableProxy cause = event.getThrowableProxy(); cause != null; cause = cause.getCause()) {
text.append(' ').append(cause.getMessage());
}
return text.toString();
}
private static Logger root() {
return (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |