Repository Analysis

dagger/dagger

Automation engine to build, test and ship any codebase. Runs locally, in CI, or directly in the cloud

0.8 Likely human-written View on GitHub
0.8
Adjusted Score
0.8
Raw Score
100%
Time Factor
2026-05-30
Last Push
15,888
Stars
Go
Language
2,115,664
Lines of Code
4640
Files
1487
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 3HIGH 22MEDIUM 10LOW 1452

Pattern Findings

1487 matches across 15 categories. Click a row to expand file-level details.

Over-Commented Block1173 hits · 1156 pts
SeverityFileLineSnippet
LOW.golangci.yml41 # All these excludes have been added on a case-by-cases basis, after reviewing the specific code that triggered
LOWcmd/dagger/shell_exec.go21 "mvdan.cc/sh/v3/interp"
LOWcmd/dagger/shell_exec.go81// It is called once variable assignments and field expansion have occurred.
LOWcmd/dagger/shell_exec.go481 newSt := *st
LOWcmd/dagger/shell_exec.go701 interp.HandlerCtx(ctx).Stderr,
LOWcmd/dagger/span_name.go1package main
LOWcmd/dagger/shell_state.go241 }
LOWcmd/codegen/generator/go/templates/functions.go321
LOWcmd/dnsname/main.go1// Copyright 2019 dnsname authors
LOWcore/services.go61 // Host is the hostname used to reach the service.
LOWcore/typedef.go201 })
LOWcore/telemetry.go261 // If the request was canceled, reflect it on the span.
LOWcore/mcp.go41// A frontend for LLM tool calling
LOWcore/modtypes.go181// ModType wraps the core TypeDef type with schema specific concerns like ID conversion
LOWcore/envfile.go121 return nil, err
LOWcore/module.go61 // instead default to the old behavior of per-session caching.
LOWcore/module.go2041
LOWcore/integration/ownership_test.go41 // NB: inheriting the user/group from the container was implemented, but we
LOWcore/integration/ssh_helper.go21// Private key used to test the new SSH modules ref format
LOWcore/integration/services_test.go1// NB(vito): be careful how you test services, in particular with a container
LOWcore/integration/host_test.go501 })
LOWcore/integration/workspace_test.go1121// TestEntrypointProxyDirectoryField verifies that a container-based module
LOWcore/integration/workspace_test.go1161`)
LOWcore/integration/images.go21 // pythonImage = "python:3.11.2-slim"
LOWcore/integration/module_test.go5761 // ]
LOWcore/integration/module_test.go5781 // "!core"
LOWcore/integration/module_test.go5801 // "**",
LOWcore/integration/module_test.go5821 // +ignore=[
LOWcore/integration/module_test.go5841 // +defaultPath="/"
LOWcore/integration/module_test.go6441 // containerEcho(stringArg: string = "Hello Self Calls"): Container {
LOWcore/integration/module_test.go6461 //
LOWcore/integration/module_test.go7121) (string, error) {
LOWcore/integration/llm_test.go381 // return func(ctr *dagger.Container) *dagger.Container {
LOW…ntegration/module_remote_workspace_defaultpath_test.go21// Fixture layout (built inline, no external dependencies):
LOW…ntegration/module_remote_workspace_defaultpath_test.go41// fixture.
LOW…ntegration/module_remote_workspace_defaultpath_test.go181 out, err := workspace().
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go2181type ContainerExportOpts struct {
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go2501// ContainerPublishOpts contains options for Container.Publish
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go2661 Random bool
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go2981 //
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go3181
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go3301 return &Container{
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go4341 // Secrets to pass to the build.
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go12541// GitOpts contains options for Query.Git
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go17141 TypeDefKindScalarKind TypeDefKind = "SCALAR_KIND"
LOW…stdata/sdks/only-codegen/internal/dagger/dagger.gen.go17161 TypeDefKindObject TypeDefKind = TypeDefKindObjectKind
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go2181type ContainerExportOpts struct {
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go2501// ContainerPublishOpts contains options for Container.Publish
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go2661 Random bool
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go2981 //
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go3181
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go3301 return &Container{
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go4341 // Secrets to pass to the build.
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go12541// GitOpts contains options for Query.Git
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go17141 TypeDefKindScalarKind TypeDefKind = "SCALAR_KIND"
LOW…stdata/sdks/only-runtime/internal/dagger/dagger.gen.go17161 TypeDefKindObject TypeDefKind = TypeDefKindObjectKind
LOW…int/hello-with-container/internal/dagger/dagger.gen.go2181type ContainerExportOpts struct {
LOW…int/hello-with-container/internal/dagger/dagger.gen.go2501// ContainerPublishOpts contains options for Container.Publish
LOW…int/hello-with-container/internal/dagger/dagger.gen.go2661 Random bool
LOW…int/hello-with-container/internal/dagger/dagger.gen.go2981 //
1113 more matches not shown…
Hyper-Verbose Identifiers204 hits · 194 pts
SeverityFileLineSnippet
LOW…/src/testdata/type_test_enum_without_directive_want.ts14function NetworkProtocolValueToName(value: NetworkProtocol): string {
LOW…/src/testdata/type_test_enum_without_directive_want.ts29function NetworkProtocolNameToValue(name: string): NetworkProtocol {
LOW…tes/src/testdata/type_test_enum_with_directive_want.ts17function ImageLayerCompressionValueToName(value: ImageLayerCompression): string {
LOW…tes/src/testdata/type_test_enum_with_directive_want.ts36function ImageLayerCompressionNameToValue(name: string): ImageLayerCompression {
LOWcore/integration/module_type_test.go1154 def from_image_layer_compression(self, image_layer_compression: dagger.ImageLayerCompression) -> str:
LOWcore/integration/module_type_test.go1158 def to_image_layer_compression(self, image_layer_compression: str) -> dagger.ImageLayerCompression:
LOWcore/integration/module_test.go4616 async def too_high_relative_dir_path(
LOWcore/integration/module_test.go4632 async def too_high_relative_file_path(
LOW…stdata/modules/python/ifaces/impl/src/impl/__init__.py132 def with_other_iface_by_iface(self, other: LocalOtherIface) -> typing.Self:
LOW…stdata/modules/python/ifaces/impl/src/impl/__init__.py137 def dynamic_other_iface_by_iface_list(self) -> list[LocalOtherIface]:
LOW…stdata/modules/python/ifaces/test/src/test/__init__.py92 def with_other_iface_by_iface(self, other: OtherIface) -> typing.Self: ...
LOW…stdata/modules/python/ifaces/test/src/test/__init__.py95 async def dynamic_other_iface_by_iface_list(self) -> list[OtherIface]: ...
LOW…stdata/modules/python/ifaces/test/src/test/__init__.py227 def with_other_iface_by_iface(
LOW…stdata/modules/python/ifaces/test/src/test/__init__.py233 async def dynamic_other_iface_by_iface_list(
LOW…/modules/python/ifaces/.dagger/src/caller/test_main.py175async def test_static_other_iface_list(iface: dagger.TestCustomIface):
LOW…/modules/python/ifaces/.dagger/src/caller/test_main.py183async def test_dynamic_other_iface_list(impl: dagger.Impl):
LOW…/modules/python/ifaces/.dagger/src/caller/test_main.py203async def test_dynamic_other_iface_by_iface_list(impl: dagger.Impl):
LOW…/modules/python/ifaces/.dagger/src/caller/test_main.py240async def test_parent_iface_fields_basic(impl: dagger.Impl):
LOW…/modules/python/ifaces/.dagger/src/caller/test_main.py269async def test_parent_iface_fields_optionals(iface: dagger.TestCustomIface):
LOW…/modules/python/ifaces/.dagger/src/caller/test_main.py280async def test_parent_iface_fields_return_custom_obj(impl: dagger.Impl):
LOW…/cookbook/snippets/copy-filter-dir-post/python/main.py10 def copy_directory_with_exclusions(
LOW…ook/snippets/copy-filter-dir-post/php/src/MyModule.php21 public function copyDirectoryWithExclusions(
LOW…_docs/cookbook/snippets/copy-modify-dir/python/main.py10 def copy_and_modify_directory(
LOW…s/cookbook/snippets/copy-filter-dir-pre/python/main.py10 async def copy_directory_with_exclusions(
LOW…book/snippets/copy-filter-dir-pre/php/src/MyModule.php21 public function copyDirectoryWithExclusions(
LOW…thon/tests/provisioning/test_integration_connection.py16async def test_connection_closed_error():
LOW…thon/tests/provisioning/test_integration_connection.py39async def test_connection_close_does_not_warn_about_unclosed_stderr_pipe():
LOWsdk/python/tests/provisioning/test_cli.py12def test_getting_connect_params(fp: FakeProcess):
LOWsdk/python/tests/provisioning/test_cli.py23def test_load_workspace_modules_flag(fp: FakeProcess):
LOWsdk/python/tests/provisioning/test_cli.py97def test_log_output_with_real_file_descriptor(fp: FakeProcess):
LOWsdk/python/tests/codegen/test_generator.py202def test_input_field_param_expected_type(ctx: Context):
LOWsdk/python/tests/codegen/test_generator.py249def test_input_object_field_deprecated():
LOWsdk/python/tests/codegen/test_generator.py289def test_generate_modern_id_surface():
LOWsdk/python/tests/codegen/test_generator.py348def test_func_doc_deprecated_args(ctx: Context):
LOWsdk/python/tests/codegen/test_generator.py377def test_interface_methods_deprecated(ctx: Context):
LOWsdk/python/tests/client/test_default_client.py17async def test_context_manager_provision(alpine_image: str):
LOWsdk/python/tests/client/test_default_client.py55 async def _assert_connection_status(self):
LOWsdk/python/tests/client/test_default_client.py62 async def test_connect_with_context_manager(self, alpine_image: str):
LOWsdk/python/tests/client/test_default_client.py85 async def test_connect_and_global_close(self, alpine_image: str):
LOWsdk/python/tests/client/test_default_client.py96 async def test_lazy_connect_and_global_close(self, alpine_image: str):
LOWsdk/python/tests/client/test_inputs.py183def test_is_not_id_type_sequence(val):
LOWsdk/python/tests/client/test_inputs.py187def test_file_is_not_id_type_sequence(file):
LOWsdk/python/tests/client/test_response.py33def test_optional_parent_with_optional_value(ctx: Context):
LOWsdk/python/tests/client/test_response.py38def test_value_with_optional_type(ctx: Context):
LOWsdk/python/tests/client/test_response.py43def test_none_value_with_optional_type(ctx: Context):
LOWsdk/python/tests/client/test_config.py4def test_compat_connect_timeout():
LOWsdk/python/tests/client/test_config.py10def test_compat_execute_timeout():
LOWsdk/python/tests/client/test_config.py17def test_compat_connect_and_execute_timeout():
LOWsdk/python/tests/client/test_config.py28def test_connect_and_execute_timeout():
LOWsdk/python/tests/client/test_integration.py72async def test_optionals_in_input_fields():
LOWsdk/python/tests/client/test_integration.py79async def test_container_with_env_variable(alpine_image: str, val: str):
LOWsdk/python/tests/client/test_integration.py90async def test_container_with_mounted_directory(alpine_image: str):
LOWsdk/python/tests/client/test_integration.py109async def test_container_with_mounted_cache(alpine_image: str):
LOWsdk/python/tests/client/test_integration.py224async def test_return_list_of_objects(alpine_image: str):
LOWsdk/python/tests/mod/test_results.py20async def test_unstructure_structure():
LOWsdk/python/tests/mod/test_results.py73 async def test_function_and_arg_name_default(self, mod: Module):
LOWsdk/python/tests/mod/test_results.py78 async def test_function_and_arg_name_custom(self, mod: Module):
LOWsdk/python/tests/mod/test_results.py118async def test_constructor_post_init():
LOWsdk/python/tests/mod/test_results.py140async def test_overridden_init_constructor():
LOWsdk/python/tests/mod/test_results.py208async def test_alt_async_constructor():
144 more matches not shown…
Cross-File Repetition17 hits · 85 pts
SeverityFileLineSnippet
HIGHsdk/python/src/dagger/client/gen.py0note ---- this is lazily evaluated, no operation is actually run. returns ------- str the `id` scalar type represents a
HIGHsdk/python/src/dagger/client/gen.py0note ---- this is lazily evaluated, no operation is actually run. returns ------- str the `id` scalar type represents a
HIGHsdk/python/src/dagger/client/gen.py0note ---- this is lazily evaluated, no operation is actually run. returns ------- str the `id` scalar type represents a
HIGHsdk/python/src/dagger/client/gen.py0force evaluation in the engine. raises ------ executetimeouterror if the time to execute the query exceeds the configure
HIGHsdk/python/src/dagger/client/gen.py0force evaluation in the engine. raises ------ executetimeouterror if the time to execute the query exceeds the configure
HIGHsdk/python/src/dagger/client/gen.py0force evaluation in the engine. raises ------ executetimeouterror if the time to execute the query exceeds the configure
HIGHsdk/python/src/dagger/client/gen.py0the generated files and directories made on top of the module source's context directory.
HIGHsdk/python/src/dagger/client/gen.py0the generated files and directories made on top of the module source's context directory.
HIGHsdk/python/src/dagger/client/gen.py0the generated files and directories made on top of the module source's context directory.
HIGHsdk/python/src/dagger/client/gen.py0the reason this enum member is deprecated, if any. returns ------- str | none the `string` scalar type represents textua
HIGHsdk/python/src/dagger/client/gen.py0the reason this enum member is deprecated, if any. returns ------- str | none the `string` scalar type represents textua
HIGHsdk/python/src/dagger/client/gen.py0the reason this enum member is deprecated, if any. returns ------- str | none the `string` scalar type represents textua
HIGHsdk/python/src/dagger/client/gen.py0returns ------- int the `int` scalar type represents non-fractional signed whole numeric values. int can represent value
HIGHsdk/python/src/dagger/client/gen.py0returns ------- int the `int` scalar type represents non-fractional signed whole numeric values. int can represent value
HIGHsdk/python/src/dagger/client/gen.py0returns ------- int the `int` scalar type represents non-fractional signed whole numeric values. int can represent value
HIGHsdk/python/src/dagger/client/gen.py0returns ------- int the `int` scalar type represents non-fractional signed whole numeric values. int can represent value
HIGHsdk/python/src/dagger/client/gen.py0returns ------- int the `int` scalar type represents non-fractional signed whole numeric values. int can represent value
Unused Imports39 hits · 39 pts
SeverityFileLineSnippet
LOW…lo-with-checks-py/src/hello_with_checks_py/__init__.py16
LOW…lueprint/myblueprint-py/src/myblueprint_py/__init__.py16
LOW…st-blueprint/myblueprint-py/src/myblueprint_py/main.py1
LOW…generators-py/src/hello_with_generators_py/__init__.py16
LOW…ith-generators-py/src/hello_with_generators_py/main.py1
LOW…a/modules/python/ifaces/.dagger/src/caller/__init__.py1
LOW…ith-services-py/src/hello_with_services_py/__init__.py3
LOW…ent/snippets/part1/python/src/coding_agent/__init__.py1
LOW…nippets/modules/testing/python/src/greeter/__init__.py16
LOWsdk/python/runtime/template/__init__.py16
LOWsdk/python/tests/mod/test_future_annotations.py8
LOWsdk/python/docs/_ext/dagger_ext.py8
LOWsdk/python/src/dagger/__init__.py4
LOWsdk/python/src/dagger/__init__.py19
LOWsdk/python/src/dagger/__init__.py20
LOWsdk/python/src/dagger/__init__.py21
LOWsdk/python/src/dagger/__init__.py22
LOWsdk/python/src/dagger/__init__.py8
LOWsdk/python/src/dagger/__init__.py13
LOWsdk/python/src/dagger/__init__.py26
LOWsdk/python/src/dagger/__init__.py16
LOWsdk/python/src/dagger/provisioning/__init__.py2
LOWsdk/python/src/dagger/provisioning/__init__.py3
LOWsdk/python/src/dagger/provisioning/__init__.py3
LOWsdk/python/src/dagger/provisioning/__init__.py4
LOWsdk/python/src/dagger/provisioning/__init__.py4
LOWsdk/python/src/dagger/provisioning/__init__.py4
LOWsdk/python/src/dagger/provisioning/_connection.py12
LOWsdk/python/src/dagger/client/base.py1
LOWsdk/python/src/dagger/mod/_converter.py37
LOWsdk/python/src/dagger/mod/__init__.py1
LOWsdk/python/src/dagger/mod/__init__.py3
LOWsdk/python/src/dagger/mod/__init__.py4
LOWsdk/python/src/dagger/mod/__init__.py5
LOWsdk/python/src/dagger/mod/__init__.py6
LOWsdk/python/src/dagger/mod/__init__.py7
LOWsdk/python/src/dagger/mod/__init__.py9
LOWsdk/python/src/dagger/mod/_utils.py35
LOWsdk/python/src/dagger/mod/_utils.py36
Hallucination Indicators3 hits · 30 pts
SeverityFileLineSnippet
CRITICALdocs/static/reference/php/js/jquery-3.5.1.slim.min.js2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):f
CRITICAL…in/java/io/dagger/annotation/processor/DaggerType.java71 } else if (io.dagger.client.Scalar.class.isAssignableFrom(clazz)) {
CRITICALengine/server/session.go249 return client.daggerSession.telemetryPubSub.srv.clientDBs.Open(ctx, client.clientID)
Cross-Language Confusion5 hits · 22 pts
SeverityFileLineSnippet
HIGH…cs/cookbook/snippets/terminal-container/python/main.py13 .with_exec(["sh", "-c", "echo hello world > /foo && cat /foo"])
HIGH…services/create-interdependent-services/python/main.py18 "nginx & while true; do curl svcb:80 && sleep 1; done",
HIGH…services/create-interdependent-services/python/main.py34 "nginx & while true; do curl svca:80 && sleep 1; done",
HIGHsdk/python/tests/client/test_integration.py181 .with_exec(["sh", "-c", "test $FOO = bar && test $TOKEN = baz"])
HIGHsdk/python/src/dagger/provisioning/_session.py83 stack.push(Pclose(session.proc))
AI Slop Vocabulary6 hits · 15 pts
SeverityFileLineSnippet
LOWinstall.sh260 # just use it's value directly
MEDIUMcmd/dagger/shell_exec.go492// Values are not processed. This function is used to leverage pflags to parse
MEDIUMcore/interface.go57 // robust.
MEDIUMinternal/buildkit/client/llb/source.go244// Formats that utilize SSH may need to supply credentials as a [GitOption].
LOWsdk/python/src/dagger/mod/_utils.py90 # Don't look in base classes (otherwise just use inspect.get_doc).
MEDIUMdagql/dagui/spans.go819 // leverage the work that goes into span.Activity, rather than having two
Fake / Example Data10 hits · 11 pts
SeverityFileLineSnippet
LOW…cs/cookbook/snippets/builds/oci-annotations/go/main.go19 WithAnnotation("org.opencontainers.image.authors", "John Doe").
LOW…ookbook/snippets/builds/oci-annotations/python/main.py17 .with_annotation("org.opencontainers.image.authors", "John Doe")
LOW…ok/snippets/builds/oci-annotations/typescript/index.ts16 .withAnnotation("org.opencontainers.image.authors", "John Doe")
LOWsdk/python/tests/codegen/test_generator.py544 "Lorem ipsum dolores est.",
LOWsdk/python/tests/codegen/test_generator.py545 '"""Lorem ipsum dolores est."""',
LOWsdk/python/tests/codegen/test_generator.py548 "Lorem ipsum dolores est.\n\nSecond paragraph.",
LOWsdk/python/tests/codegen/test_generator.py551 """Lorem ipsum dolores est.
LOWsdk/python/tests/codegen/test_generator.py566 'Lorem ipsum dolores est.\n\nExample: "foobar"',
LOWsdk/python/tests/codegen/test_generator.py569 """Lorem ipsum dolores est.
LOWsdk/python/tests/client/test_connection_errors.py49 "message": "Lorem ipsum",
Slop Phrases4 hits · 9 pts
SeverityFileLineSnippet
LOWinternal/buildkit/frontend/dockerui/config.go47 // Don't forget to update frontend documentation if you add
LOWsdk/python/src/dagger/mod/_resolver.py254 # make sure to get type hints for __init__ instead of class
MEDIUMhelm/dagger/values.yaml15 # precedence over toml if both are provided, however you can use toml for
MEDIUMhelm/dagger/values.yaml166 # You may want to adjust this to fit your workloads so that the Engine stops quicker.
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippet
LOWsdk/python/src/dagger/provisioning/_session.py258 # Check if subprocess exited with an error
LOWsdk/python/src/dagger/mod/_module.py758 # Check if function is marked as a check or generator
LOWsdk/python/src/dagger/mod/_utils.py360 # Check if this is an enum member assignment
LOWhelm/dagger/values.yaml126 ### Set priorityClassName to avoid eviction
LOWhelm/dagger/values.yaml129 ### Set runtimeClassName to use a custom runtimeClass
Excessive Try-Catch Wrapping7 hits · 7 pts
SeverityFileLineSnippet
LOWsdk/python/src/dagger/provisioning/_session.py62 except Exception: # Including KeyboardInterrupt, wait handled that.
LOWsdk/python/src/dagger/mod/_module.py365 except Exception as e:
LOWsdk/python/src/dagger/mod/_module.py457 except Exception as e:
LOWsdk/python/src/dagger/mod/_module.py493 except Exception as e:
LOWsdk/python/src/dagger/mod/_module.py537 except Exception as e:
LOWsdk/python/src/dagger/mod/cli.py48 except Exception as e:
LOWsdk/python/src/dagger/mod/cli.py59 except Exception as e:
Decorative Section Separators3 hits · 7 pts
SeverityFileLineSnippet
MEDIUM…et/sdk/Dagger.SDK.SourceGenerator/Code/CodeRenderer.cs261 // ─── Helpers ──────────────────────────────────────────────
MEDIUMdagql/idtui/notification.go17// ╰─────────────────────╯
MEDIUMdagql/idtui/notification.go69 // Bottom border: ╰───────────────────╯
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippet
LOWcmd/dagger/shell.go709// writes the final output to the stdoutWriter. We need to check if that
LOWcore/workspace/detect.go53 // Step 1: .git found → workspace = CWD, sandbox = git root
LOWcore/workspace/detect.go61 // Step 2: nothing found → cwd is both workspace and sandbox root
LOW…cript/src/module/introspector/typescript_module/ast.ts385 // Float will be interpreted as number by the TypeScript compiler so we need to check if the
Deep Nesting6 hits · 6 pts
SeverityFileLineSnippet
LOWsdk/python/codegen/src/codegen/generator.py911
LOWsdk/python/codegen/src/codegen/ast.py6
LOWsdk/python/src/dagger/client/_core.py291
LOWsdk/python/src/dagger/mod/_module.py125
LOWsdk/python/src/dagger/mod/_utils.py306
LOWsdk/python/src/dagger/mod/_utils.py339
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMdocs/src/scripts/new.sh3## Create a new documentation article