Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/cli/cmd/repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var reposCmd = &cobra.Command{

apiClient := getAPIClient()

result, err := apiClient.ListClassifierRepositories(ctx, url.Values{})
result, err := apiClient.ListContextRepositories(ctx, url.Values{})
if err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func init() {
// Skip RegisterChatCommands - the handwritten chat command handles interactive chat;
// generated chat API subcommands are bridged via RegisterChatSubcommands.
commands.RegisterChatSubcommands(chatCmd, getAPIClient)
commands.RegisterClassifierCommands(apiCmd, getAPIClient)
commands.RegisterContextCommands(apiCmd, getAPIClient)
commands.RegisterCspmCommands(apiCmd, getAPIClient)
// Register pentest and bughunt subcommands from generated DAST commands
commands.RegisterPentestSubcommands(pentestCmd, getAPIClient)
Expand Down
416 changes: 208 additions & 208 deletions internal/api/classifier.go → internal/api/context.go

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions internal/commands/classifier.go → internal/commands/context.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/mcp/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func registerResources(s *server.MCPServer, c *client.NullifyClient, queryParams
},
func(ctx context.Context, request mcplib.ReadResourceRequest) ([]mcplib.ResourceContents, error) {
qs := buildQueryString(queryParams)
result, err := doGet(ctx, c, "/classifier/repositories"+qs)
result, err := doGet(ctx, c, "/context/repositories"+qs)
if err != nil {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions internal/mcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ func registerTools(s *server.MCPServer, c *client.NullifyClient, queryParams map
registerCommentTools(s, c, queryParams)

case ToolSetAdmin:
// Admin + classifier + manager + infrastructure + composites
// Admin + context + manager + infrastructure + composites
registerAdminTools(s, c, queryParams)
registerClassifierTools(s, c, queryParams)
registerContextTools(s, c, queryParams)
registerManagerTools(s, c, queryParams)
registerInfrastructureTools(s, c, queryParams)
registerCompositeTools(s, c, queryParams)
Expand All @@ -64,7 +64,7 @@ func registerTools(s *server.MCPServer, c *client.NullifyClient, queryParams map
registerBughuntTools(s, c, queryParams)
registerCSPMTools(s, c, queryParams)
registerAdminTools(s, c, queryParams)
registerClassifierTools(s, c, queryParams)
registerContextTools(s, c, queryParams)
registerManagerTools(s, c, queryParams)
registerInfrastructureTools(s, c, queryParams)
registerCodeReviewTools(s, c, queryParams)
Expand All @@ -73,10 +73,10 @@ func registerTools(s *server.MCPServer, c *client.NullifyClient, queryParams map
registerUnifiedTools(s, c, queryParams)

default: // ToolSetDefault
// Unified + composites + classifier + infrastructure + manager + code reviews + comments
// Unified + composites + context + infrastructure + manager + code reviews + comments
registerUnifiedTools(s, c, queryParams)
registerCompositeTools(s, c, queryParams)
registerClassifierTools(s, c, queryParams)
registerContextTools(s, c, queryParams)
registerInfrastructureTools(s, c, queryParams)
registerManagerTools(s, c, queryParams)
registerCodeReviewTools(s, c, queryParams)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import (
"github.com/mark3labs/mcp-go/server"
)

func registerClassifierTools(s *server.MCPServer, c *client.NullifyClient, queryParams map[string]string) {
func registerContextTools(s *server.MCPServer, c *client.NullifyClient, queryParams map[string]string) {
s.AddTool(
mcp.NewTool(
"list_repositories",
mcp.WithDescription("List repositories monitored by Nullify. Shows all connected code repositories with their classification and scanning status."),
mcp.WithNumber("limit", mcp.Description("Max results (default 20)")),
),
makeGetHandler(c, "/classifier/repositories", queryParams),
makeGetHandler(c, "/context/repositories", queryParams),
)

s.AddTool(
Expand All @@ -26,7 +26,7 @@ func registerClassifierTools(s *server.MCPServer, c *client.NullifyClient, query
mcp.WithDescription("Get detailed information about a specific monitored repository."),
mcp.WithString("id", mcp.Required(), mcp.Description("The repository ID")),
),
makeGetByIDHandler(c, "/classifier/repositories", queryParams),
makeGetByIDHandler(c, "/context/repositories", queryParams),
)

s.AddTool(
Expand All @@ -35,7 +35,7 @@ func registerClassifierTools(s *server.MCPServer, c *client.NullifyClient, query
mcp.WithDescription("List applications classified by Nullify. Applications are logical groupings of repositories and services that form a product or system."),
mcp.WithNumber("limit", mcp.Description("Max results (default 20)")),
),
makeGetHandler(c, "/classifier/applications", queryParams),
makeGetHandler(c, "/context/applications", queryParams),
)

s.AddTool(
Expand All @@ -44,7 +44,7 @@ func registerClassifierTools(s *server.MCPServer, c *client.NullifyClient, query
mcp.WithDescription("Get detailed information about a specific application, including its associated repositories and dependencies."),
mcp.WithString("id", mcp.Required(), mcp.Description("The application ID")),
),
makeGetByIDHandler(c, "/classifier/applications", queryParams),
makeGetByIDHandler(c, "/context/applications", queryParams),
)

s.AddTool(
Expand All @@ -54,7 +54,7 @@ func registerClassifierTools(s *server.MCPServer, c *client.NullifyClient, query
mcp.WithString("repository", mcp.Description("Filter by repository name")),
mcp.WithNumber("limit", mcp.Description("Max results (default 20)")),
),
makeGetHandler(c, "/classifier/dependencies", queryParams),
makeGetHandler(c, "/context/dependencies", queryParams),
)

s.AddTool(
Expand All @@ -69,7 +69,7 @@ func registerClassifierTools(s *server.MCPServer, c *client.NullifyClient, query
repoID := getStringArg(args, "repo_id")
projectID := getStringArg(args, "project_id")
qs := buildQueryString(queryParams)
return doGet(ctx, c, fmt.Sprintf("/classifier/sboms/repository/%s/project/%s%s", repoID, projectID, qs))
return doGet(ctx, c, fmt.Sprintf("/context/sboms/repository/%s/project/%s%s", repoID, projectID, qs))
},
)

Expand All @@ -78,6 +78,6 @@ func registerClassifierTools(s *server.MCPServer, c *client.NullifyClient, query
"get_dependency_exposure",
mcp.WithDescription("Get dependency exposure analysis showing which dependencies are exposed to the internet or internal networks."),
),
makeGetHandler(c, "/classifier/deps/exposure", queryParams),
makeGetHandler(c, "/context/deps/exposure", queryParams),
)
}
4 changes: 2 additions & 2 deletions scripts/generate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var serviceMapping = map[string]string{
"/dast/": "dast",
"/admin/": "admin",
"/manager/": "manager",
"/classifier/": "classifier",
"/context/": "context",
"/cspm/": "cspm",
"/graph/": "infrastructure",
"/chat/": "chat",
Expand All @@ -88,7 +88,7 @@ var serviceDescriptions = map[string]string{
"dast": "Dynamic Application Security Testing (DAST)",
"admin": "Administration and Metrics",
"manager": "Finding Lifecycle Management",
"classifier": "Repository and Code Classification",
"context": "Repository and Code Classification",
"cspm": "Cloud Security Posture Management (CSPM)",
"infrastructure": "Infrastructure Graph",
"chat": "AI Chat",
Expand Down
Loading