{"record":{"id":"b57a9e51425def40","repo":"nektos/act","slug":"max-depth-d-of-symlinks-exceeded-while-reading-s-b57a9e","errorCode":null,"errorMessage":"max depth %d of symlinks exceeded while reading %s","messagePattern":"max depth (.+?) of symlinks exceeded while reading (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/step_action_remote.go","lineNumber":100,"sourceCode":"\t\t\t\t\t\ttars, err := cache.GetTarArchive(ctx, sar.cacheDir, sar.resolvedSha, spath)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, nil, os.ErrNotExist\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttreader := tar.NewReader(tars)\n\t\t\t\t\t\theader, err := treader.Next()\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, nil, os.ErrNotExist\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif header.FileInfo().Mode()&os.ModeSymlink == os.ModeSymlink {\n\t\t\t\t\t\t\tspath, err = symlinkJoin(spath, header.Linkname, \".\")\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\treturn nil, nil, err\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn treader, tars, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn nil, nil, fmt.Errorf(\"max depth %d of symlinks exceeded while reading %s\", maxSymlinkDepth, spath)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tactionModel, err := sar.readAction(ctx, sar.Step, sar.resolvedSha, sar.remoteAction.Path, remoteReader(ctx), os.WriteFile)\n\t\t\tsar.action = actionModel\n\t\t\treturn err\n\t\t}\n\n\t\tactionDir := fmt.Sprintf(\"%s/%s\", sar.RunContext.ActionCacheDir(), safeFilename(sar.Step.Uses))\n\t\tgitClone := stepActionRemoteNewCloneExecutor(git.NewGitCloneExecutorInput{\n\t\t\tURL:         sar.remoteAction.CloneURL(),\n\t\t\tRef:         sar.remoteAction.Ref,\n\t\t\tDir:         actionDir,\n\t\t\tToken:       github.Token,\n\t\t\tOfflineMode: sar.RunContext.Config.ActionOfflineMode,\n\t\t})\n\t\tvar ntErr common.Executor\n\t\tif err := gitClone(ctx); err != nil {","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/runner/step_action_remote.go#L82-L118","documentation":"Remote-action counterpart of the local symlink-depth error: while reading files (action.yml, etc.) from the cached tar archive of a remote action, act followed maxSymlinkDepth symlinks (each constrained to stay within '.' via symlinkJoin) without reaching a regular file, and gives up with this error.","triggerScenarios":"A remote action's repository contains a symlink cycle or a symlink chain longer than maxSymlinkDepth in the path act reads (action metadata or run files); the archived tar records symlinks whose linknames chain indefinitely.","commonSituations":"A third-party action repo with circular symlinks (accidental or malicious probing); cache corruption replaying a malformed tar; repos that rely on build-time symlink resolution GitHub performs but which form a loop in raw archive form.","solutions":["Inspect the action repo for symlink loops in the referenced path; report/avoid the action if broken.","Clear act's action cache directory so a fresh, clean archive is fetched.","Pin to an earlier ref of the action known to lack the loop, or vendor the action locally."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# verify a cached action archive has no symlink cycles\ntar -tvf ~/.cache/act/<org>_<repo>.tar | awk '$1 ~ /^l/ {print $6, $NF}'  # inspect symlink -> target pairs for loops","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin third-party actions to reviewed full SHAs.","Clear the action cache if archives may be corrupted.","Vendor suspicious actions locally and review their tree."],"tags":["symlink","remote-action","action-cache","security"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}