Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c6673d0
Add placeholder to prompt input
SplotyCode Dec 22, 2025
f6b1e13
Publish setting changes into own topic
SplotyCode Dec 22, 2025
8f6a6a8
Show warning when llm provider is not configured
SplotyCode Dec 22, 2025
fdde8ac
Move SecureCoderAiToolWindowFactory into own package
SplotyCode Dec 22, 2025
f66960e
Split up SecureCoderAiToolWindowFactory
SplotyCode Dec 22, 2025
7f00763
Dont translate internal error messages
SplotyCode Dec 22, 2025
dddc58d
Exclude coroutines libs from build
SplotyCode Dec 22, 2025
33f99d5
Fix project context control
SplotyCode Dec 22, 2025
1e24b6c
Write context as user role
SplotyCode Dec 22, 2025
4176fe3
Expose chat messages in InvalidLlmOutputWarning
SplotyCode Dec 24, 2025
f672f60
Add debug popup for invalid LLM responses
SplotyCode Dec 25, 2025
494ff1b
Add failures in GuardianExecutor result rather than throwing
SplotyCode Dec 28, 2025
6091584
Expose full GuardianExecutor result in GuardianWarningEvent
SplotyCode Dec 28, 2025
c162d35
Include raw result in parsed violation data
SplotyCode Dec 28, 2025
6c470f1
Added `parseChangesAttempts` to workflow engine configuration
SplotyCode Dec 28, 2025
728debd
Restructure guardian stream events
SplotyCode Dec 28, 2025
518c0a5
Add optional delay to DummyGuardian
SplotyCode Dec 29, 2025
6bc013f
Redo guardian validations in the frontend
SplotyCode Dec 29, 2025
3f3a876
Use ProposalId instead of String
SplotyCode Dec 29, 2025
791c053
Present warnings more user friendly
SplotyCode Dec 29, 2025
d50112d
Improve guardian summary
SplotyCode Dec 29, 2025
2b64443
Merge pull request #8 from stg-tud/feature/chat-frontend-improvements
SplotyCode Dec 29, 2025
c47b661
Add Docker support for openapi-bridge
SplotyCode Dec 30, 2025
e73e479
openapi -> openai
SplotyCode Dec 30, 2025
6d411d8
Dont inherit java properties for openai-bridge java exec task
SplotyCode Dec 30, 2025
88d708e
Improve error handling of OllamaClient
SplotyCode Dec 30, 2025
8edfe63
Fix openai-bridge rename
SplotyCode Dec 30, 2025
04a4515
Add in the prompt to only create ONE file when using openai bridge
SplotyCode Dec 30, 2025
d0281d2
Rename openai bridge package
SplotyCode Dec 30, 2025
9e479e7
Add debug logging to llm clients
SplotyCode Jan 1, 2026
504a14e
Improved response handling for smaller llms
SplotyCode Jan 2, 2026
5ae891d
Release plugin 0.0.3
SplotyCode Jan 2, 2026
309a01b
Fix grammar in FilesInContextPromptBuilder
SplotyCode Jan 3, 2026
89da0c7
Add EngineLlmReplayTests
SplotyCode Jan 3, 2026
4c70332
<EDITN> blocks -> edit blocks
SplotyCode Jan 3, 2026
2055fff
Move FilesInContextPromptBuilder to file package
SplotyCode Jan 3, 2026
4a9860d
Dont dedupe llm changes
SplotyCode Jan 3, 2026
31d81e8
Basic structured output support
SplotyCode Jan 3, 2026
86bbd19
Add LLMDescription annotation
SplotyCode Jan 3, 2026
d2f179d
Add structured output support in logging and replay
SplotyCode Jan 3, 2026
899397d
Add StructuredEditFilesLlmWrapper
SplotyCode Jan 4, 2026
ab87add
Add replay test in ci
SplotyCode Jan 4, 2026
d8195eb
Merge pull request #10 from stg-tud/feature/structured-output
SplotyCode Jan 4, 2026
2ebf442
update gitignore for python
prizmo-prime Jan 6, 2026
2f42af7
Add Python entries to gitignore and update CWEval submodule
prizmo-prime Jan 8, 2026
932ba58
Merge branch 'main' of https://github.com/stg-tud/SecureCoder
prizmo-prime Jan 8, 2026
1af196d
Merge branch 'feature/secbench-cli'
prizmo-prime Jan 8, 2026
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ bin/
/nbdist/
/.nb-gradle/

### Python ###
**/__pycache__/
**/*.pyc
**/.venv/
**/.venvs/



### VS Code ###
.vscode/

Expand Down
6 changes: 6 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ suspend fun runSecurityEval(
val fs = InMemoryFileSystem()
val onEvent: suspend (StreamEvent) -> Unit = { ev ->
when (ev) {
is StreamEvent.EditFiles -> {
is StreamEvent.ProposedEdits -> {
println(ev)
fs.applyEdits(ev.changes.searchReplaces)
}
is StreamEvent.ValidationStarted -> {}
is StreamEvent.ValidationSucceeded -> {}
is StreamEvent.SendDebugMessage -> {
if (ev.icon != EventIcon.Info) {
println("ENGINE: $ev")
Expand All @@ -67,7 +69,12 @@ suspend fun runSecurityEval(
}
}
}
engine.run(item.prompt, fs, onEvent)
val result = engine.run(item.prompt, fs, onEvent)
if (result !is Engine.EngineResult.Success) {
println("Failed to generate edits for item $item: $result")
continue
}
fs.applyEdits(result.changes.searchReplaces)
val files = fs.allFiles().toList()
if (files.size != 1) {
println("Expected 1 file, but got ${files.size}")
Expand Down
5 changes: 5 additions & 0 deletions app/intellij-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ kotlin {
jvmToolchain(21)
}

configurations.all {
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-core")
exclude(group = "org.jetbrains.kotlinx", module = "kotlinx-coroutines-jdk8")
}

tasks {
patchPluginXml {
changeNotes.set("""
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import de.tuda.stg.securecoder.engine.file.edit.ApplyChanges
import de.tuda.stg.securecoder.engine.file.edit.ApplyChanges.applyEdits
import de.tuda.stg.securecoder.filesystem.FileSystem
import de.tuda.stg.securecoder.plugin.SecureCoderBundle
import com.intellij.openapi.diagnostic.Logger
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.runBlocking
import javax.swing.BorderFactory
Expand Down Expand Up @@ -98,12 +99,13 @@ fun buildEditFilesPanel(
project
)
}
} catch (t: Throwable) {
} catch (throwable: Throwable) {
LOG.error("Failed to apply edits", throwable)
SwingUtilities.invokeLater {
Notifications.Bus.notify(
notification(
SecureCoderBundle.message("edit.apply.error.title"),
t.message ?: t.toString(),
throwable.message ?: throwable.toString(),
NotificationType.ERROR
),
project
Expand Down Expand Up @@ -167,6 +169,8 @@ fun buildEditFilesPanel(
return panel
}

private val LOG: Logger = Logger.getInstance("BuildEditFilesPanel")

private fun openDiffForFile(project: Project, fileUrl: String, edits: List<Changes.SearchReplace>) {
val vfm = VirtualFileManager.getInstance()
val vFile: VirtualFile? = vfm.findFileByUrl(fileUrl)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import de.tuda.stg.securecoder.engine.file.edit.Changes
import de.tuda.stg.securecoder.engine.file.edit.Changes.*
import de.tuda.stg.securecoder.engine.stream.EventIcon
import de.tuda.stg.securecoder.engine.stream.StreamEvent
import de.tuda.stg.securecoder.engine.stream.ProposalId
import de.tuda.stg.securecoder.filesystem.FileSystem
import kotlinx.coroutines.delay
import java.util.concurrent.ThreadLocalRandom
Expand Down Expand Up @@ -39,7 +40,7 @@ class DummyAgentStreamer : Engine {
val icon = randomPick(EventIcon.entries)
onEvent(StreamEvent.SendDebugMessage(title, desc, icon))
if (idx % 3 == 0) {
onEvent(StreamEvent.EditFiles(Changes(listOf(
onEvent(StreamEvent.ProposedEdits(ProposalId.newId(), Changes(listOf(
SearchReplace("app.py", SearchedText.append(), "print(\"Hello World!\")"),
SearchReplace("app2.py", SearchedText.append(), "print(\"Hello World!\")"),
SearchReplace("app.py", SearchedText.append(), "\nprint(\"Hello World!2\")"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class EngineRunnerService(
PromptEnricher.PASSTHROUGH
}
val guardians = listOfNotNull(
if (settings.enableDummyGuardian) DummyGuardian() else null,
if (settings.enableDummyGuardian) DummyGuardian(sleepMillis = 2000) else null,
if (settings.enableCodeQLGuardian) CodeQLGuardian(settings.codeqlBinary) else null
)

Expand All @@ -78,19 +78,20 @@ class EngineRunnerService(
withBackgroundProgress(project, "Running engine…", cancellable = false) {
val fileSystem = IntelliJProjectFileSystem(project)
var handle: EngineHandle? = null
val mapper = StreamEventMapper()

try {
handle = buildEngine()
val result = handle.engine.run(
text,
fileSystem,
{ engineEvent -> onUiEvent(StreamEventMapper.map(engineEvent)) },
{ engineEvent -> onUiEvent(mapper.map(engineEvent)) },
buildContext(reduceContextToOpenFiles)
)
onUiEvent(EngineResultMapper.map(result))
EngineResultMapper.map(mapper, result)?.let { onUiEvent(it) }
} catch (exception: Exception) {
thisLogger().error("Uncaught exception within the engine", exception)
onUiEvent(StreamEventMapper.mapException(exception))
onUiEvent(mapper.mapException(exception))
} finally {
runCatching { handle?.close?.invoke() }.onFailure {
thisLogger().warn("Failed closing engine handle", it)
Expand Down
Loading
Loading