Home Ai 自动化测试工具shanno24k白盒测试)
Post
Cancel

Ai 自动化测试工具shanno24k白盒测试)

refer to: https://github.com/KeygraphHQ/shannon

注意:这是个 白盒测试。 源代码是必须的。 

web页面:

https://shannon-ai.com/chat

感觉在跟我胡侃。

安装和使用

下载代码

git clone https://github.com/KeygraphHQ/shannon.git

看一下安装过程,需要 claude. 这个用大陆信用卡无法购买,没事,到咸鱼上,有很多人在卖,跳板服务。

随便过去买点,就可以拿过来用了。例如:https://www.yuque.com/qiuleguo-milem/xfvwh4/fb8fxog8mcgawm0e?singleDoc#

然后就可以获得了对应的key.

cd shannon

然后修改 .env 文件:

10 ANTHROPIC_BASE_URL=http://1.95.142.151:3000/v1
11 ANTHROPIC_API_KEY=sk-lazPFGhCV5Rci5pap20j9W4Zj9KxO6inD5vtEOEEAz??????

为整个docker添加代理。(或者为当前操作系统层面)docker-compose up 

然后就等待,需要 等半天。(30分钟吧)

访问 http://127.0.0.1:8233

这里只是一个白板

想要进一步使用的话,需要进入docker ,进入到worker那个。

docker exec -it shannon-worker-1 /bin/bash 

$ shannon -h

好的, 接下来,把要进行代码审计的代码,放到 本地的SHANNON 目录下的 repos 目录。

然后,在host中,运行 shannon , (注意,不是 docker 中)

可以看到,已经跑起来了。

然后,打开本地的浏览器,访问:

http://localhost:8233/namespaces/default/workflows/stableflow-app_shannon-1771734320284/019c8398-44a1-76f2-aa77-aa537d0a1499/history

发现需要login:

{
  "type": "workflowExecutionFailedEventAttributes",
  "failure": {
    "message": "Activity task failed",
    "cause": {
      "message": "Authentication failed: Not logged in · Please run /login",
      "source": "TypeScriptSDK",
      "stackTrace": "ApplicationFailure: Authentication failed: Not logged in · Please run /login\n    at ApplicationFailure.nonRetryable (/app/node_modules/@temporalio/common/lib/failure.js:207:16)\n    at runAgentActivity (file:///app/dist/temporal/activities.js:137:48)\n    at async Activity.execute (/app/node_modules/@temporalio/worker/lib/activity.js:101:20)\n    at async NativeConnection.withAbortSignal (/app/node_modules/@temporalio/worker/lib/connection.js:172:16)\n    at async Client.withAbortSignal (/app/node_modules/@temporalio/client/lib/base-client.js:65:16)\n    at async /app/node_modules/@temporalio/worker/lib/activity.js:161:32\n    at async /app/node_modules/@temporalio/worker/lib/worker.js:725:30",
      "applicationFailureInfo": {
        "type": "AgentExecutionError",
        "nonRetryable": true,
        "details": {
          "payloads": [
            [
              {
                "agentName": "pre-recon",
                "attemptNumber": 1,
                "elapsed": 7067
              }
            ]
          ]
        }
      }
    },
    "activityFailureInfo": {
      "scheduledEventId": "11",
      "startedEventId": "12",
      "identity": "1@0cd97129fbcc",
      "activityType": {
        "name": "runPreReconAgent"
      },
      "activityId": "2",
      "retryState": "RETRY_STATE_NON_RETRYABLE_FAILURE"
    }
  },
  "retryState": "RETRY_STATE_RETRY_POLICY_NOT_SET",
  "workflowTaskCompletedEventId": "22"
}

解决办法:

修改 ./configs 目录下的配置文件

This post is licensed under CC BY 4.0 by the author.