Skip to content

Commit 7b951f2

Browse files
authored
docs: add documentation for the features (#1)
1 parent 693e6c0 commit 7b951f2

File tree

4 files changed

+90
-6
lines changed

4 files changed

+90
-6
lines changed

README.md

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
11
# Sysdig LSP
22

3-
Sysdig LSP is a Language Server Protocol (LSP) implementation that seamlessly integrates vulnerability management into your preferred editor. It scans images defined in Dockerfiles and requires manual configuration.
4-
5-
For Visual Studio Code users, we highly recommend the [Sysdig VSCode Extension](https://marketplace.visualstudio.com/items?itemName=sysdig.sysdig-vscode-ext). This extension delivers full LSP functionality along with additional features, ensuring an optimal experience. Although the LSP is designed to eventually replace the extension, the extension currently remains the best option for VSCode.
6-
7-
Repository: [https://github.com/sysdiglabs/sysdig-lsp](https://github.com/sysdiglabs/sysdig-lsp)
3+
**Sysdig LSP** is a Language Server Protocol implementation that integrates vulnerability scanning directly into your editor.
4+
It enables quick scans of Dockerfiles, Docker Compose files, Kubernetes manifests, and Infrastructure-as-Code (IaC) files,
5+
helping you detect vulnerabilities and misconfigurations earlier in the development process.
6+
7+
> [!NOTE]
8+
> For Visual Studio Code users, we highly recommend the [Sysdig VSCode Extension](https://marketplace.visualstudio.com/items?itemName=sysdig.sysdig-vscode-ext).
9+
>
10+
> This extension currently provides full LSP functionality and additional features for the best experience.
11+
>
12+
> In the future, the extension will internally leverage the Sysdig LSP implementation, ensuring consistent features and a unified experience across all editors.
13+
>
14+
> Repository: [https://github.com/sysdiglabs/sysdig-lsp](https://github.com/sysdiglabs/sysdig-lsp)
15+
16+
## Features
17+
18+
| Feature | **[VSCode Extension](https://github.com/sysdiglabs/vscode-extension)** | **Sysdig LSP** |
19+
|---------------------------------|------------------------------------------------------------------------|----------------------------------------------------------|
20+
| Scan base image in Dockerfile | Supported | [Supported](./docs/features/scan_base_image.md) (0.1.0+) |
21+
| Code lens support | Supported | In roadmap |
22+
| Build and Scan Dockerfile | Supported | In roadmap |
23+
| Layered image analysis | Supported | In roadmap |
24+
| Docker-compose image analysis | Supported | In roadmap |
25+
| K8s Manifest image analysis | Supported | In roadmap |
26+
| Infrastructure-as-code analysis | Supported | In roadmap |
27+
| Vulnerability explanation | Supported | In roadmap |
828

929
## Build
1030

@@ -42,6 +62,28 @@ Sysdig LSP is developed in Rust and can be built using Cargo or Nix (a flake is
4262
nix build .#sysdig-lsp
4363
```
4464

65+
#### Cross-compiling with Nix
66+
67+
Cross-compilation is made easy with Nix, we have prepared some targets that you can execute to build the binaries as static files.
68+
Not all cross-compilations are supported though:
69+
70+
| | **Target Linux** | **Target MacOS** | **Target Windows** |
71+
|--------------------|------------------|------------------|--------------------|
72+
| **Host Linux** ||||
73+
| **Host MacOS** ||||
74+
| **Host Windows** ||||
75+
76+
The following binaries are built:
77+
78+
- Linux x86_64: `nix build .#sysdig-lsp-linux-amd64`
79+
- Linux aarch64: `nix build .#sysdig-lsp-linux-arm64`
80+
- Darwin x86_64: `nix build .#sysdig-lsp-darwin-amd64`
81+
- Darwin aarch64: `nix build .#sysdig-lsp-darwin-arm64`
82+
83+
Windows is not yet supported because the Sysdig CLI Scanner is not releasing a .exe for now, but you can still build it with `nix build .#sysdig-lsp-windows-amd64`
84+
85+
The result of the compilation will be saved in `./result/bin`.
86+
4587
## Configuration Options
4688

4789
Sysdig LSP supports two configuration options for connecting to Sysdig’s services:
@@ -95,7 +137,11 @@ Navigate to **Settings > Configure Kate > LSP Client > User Server Settings** an
95137

96138
### JetBrains IDEs
97139

98-
> **Warning:** The configuration for JetBrains IDEs is not definitive. In the future, we plan to develop a dedicated plugin that will automatically manage the LSP and expand its functionalities. In the meantime, you can use the [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin for initial day-one support.
140+
141+
> [!WARNING]
142+
> The configuration for JetBrains IDEs is not definitive.
143+
> In the future, we plan to develop a dedicated plugin that will automatically manage the LSP and expand its functionalities.
144+
> In the meantime, you can use the [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin for initial day-one support.
99145
100146
1. Install the [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin.
101147
2. Open the LSP Client config (usually near the Terminal), click **New Language Server** and configure:

docs/features/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Sysdig LSP Features
2+
3+
- [Scan Base Image](./scan_base_image.md)

docs/features/scan_base_image.gif

785 KB
Loading

docs/features/scan_base_image.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Scan Base Image
2+
3+
Sysdig LSP scans the base image defined in your Dockerfile to identify vulnerabilities early in your development workflow.
4+
5+
> [!IMPORTANT]
6+
> Sysdig LSP analyzes only the final FROM instruction(s), as this specifies the runtime base image for your container.
7+
>
8+
> Intermediate stages defined in multi-stage Dockerfiles (e.g., builder images) are intentionally ignored because they don't
9+
> form part of the final runtime environment.
10+
11+
![Sysdig LSP executing base image scan in the Helix editor](./scan_base_image.gif)
12+
13+
## Examples
14+
15+
### Single-stage Dockerfile (scanned)
16+
17+
```dockerfile
18+
# Base image used for this Dockerfile
19+
FROM alpine:latest
20+
```
21+
22+
### Multi-stage Dockerfile (only the final stage is scanned)
23+
24+
```dockerfile
25+
# Build stage (ignored by Sysdig LSP)
26+
FROM golang:1.19 AS build
27+
RUN go build -o app main.go
28+
29+
# Final image (scanned by Sysdig LSP)
30+
FROM alpine:3.17
31+
COPY --from=build /app /app
32+
ENTRYPOINT ["/app"]
33+
```
34+
35+
In this multi-stage Dockerfile, Sysdig LSP scans only the final stage (`alpine:3.17`).

0 commit comments

Comments
 (0)