Documentation
¶
Overview ¶
markdown.go provides Markdown formatting functions for security settings MCP tool output.
register.go wires security settings MCP tools to the MCP server.
Package securitysettings implements GitLab project and group security settings operations including get and update for secret push protection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatGroupMarkdown ¶
func FormatGroupMarkdown(o GroupOutput) string
FormatGroupMarkdown renders group security settings as Markdown.
func FormatProjectMarkdown ¶
func FormatProjectMarkdown(o ProjectOutput) string
FormatProjectMarkdown renders project security settings as Markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers MCP tools for GitLab security settings operations.
Types ¶
type GetProjectInput ¶
type GetProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
GetProjectInput holds parameters for getting project security settings.
type GroupOutput ¶
type GroupOutput struct {
toolutil.HintableOutput
SecretPushProtectionEnabled bool `json:"secret_push_protection_enabled"`
Errors []string `json:"errors,omitempty"`
}
GroupOutput represents group security settings.
func UpdateGroup ¶
func UpdateGroup(ctx context.Context, client *gitlabclient.Client, in UpdateGroupInput) (GroupOutput, error)
UpdateGroup updates the secret push protection setting for a group.
type ProjectOutput ¶
type ProjectOutput struct {
toolutil.HintableOutput
ProjectID int64 `json:"project_id"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
AutoFixContainerScanning bool `json:"auto_fix_container_scanning"`
AutoFixDAST bool `json:"auto_fix_dast"`
AutoFixDependencyScanning bool `json:"auto_fix_dependency_scanning"`
AutoFixSAST bool `json:"auto_fix_sast"`
ContinuousVulnerabilityScansEnabled bool `json:"continuous_vulnerability_scans_enabled"`
ContainerScanningForRegistryEnabled bool `json:"container_scanning_for_registry_enabled"`
SecretPushProtectionEnabled bool `json:"secret_push_protection_enabled"`
}
ProjectOutput represents project security settings.
func GetProject ¶
func GetProject(ctx context.Context, client *gitlabclient.Client, in GetProjectInput) (ProjectOutput, error)
GetProject returns the security settings for a project.
func UpdateProject ¶
func UpdateProject(ctx context.Context, client *gitlabclient.Client, in UpdateProjectInput) (ProjectOutput, error)
UpdateProject updates the secret push protection setting for a project.
type UpdateGroupInput ¶
type UpdateGroupInput struct {
GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
SecretPushProtectionEnabled bool `json:"secret_push_protection_enabled" jsonschema:"Enable or disable secret push protection,required"`
ProjectsToExclude []int64 `json:"projects_to_exclude,omitempty" jsonschema:"Project IDs to exclude from group-level protection"`
}
UpdateGroupInput holds parameters for updating group secret push protection.
type UpdateProjectInput ¶
type UpdateProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
SecretPushProtectionEnabled bool `json:"secret_push_protection_enabled" jsonschema:"Enable or disable secret push protection,required"`
}
UpdateProjectInput holds parameters for updating project secret push protection.