Edge-home-orchestration-go: 【讨论】SecurityMgr需要整改吗? (敏感数据处理)

创建于 2020-09-14  ·  6评论  ·  资料来源: lf-edge/edge-home-orchestration-go

最有用的评论

@tdrozdovsky Plus,如果在我们的平台中使用了err ,您能纠正一下吗?

https://github.com/lf-edge/edge-home-orchestration-go/blob/22ce49b4b76ae78dfb75e14ef64399e5805c7d02/src/orchestrationapi/orchestration_api.go#L180

我研究了使用err变量。 错误处理在下面完成。

if len(deviceScores) <= 0 {
        return errorResp
} else if deviceScores[0].score == scoringmgr.INVALID_SCORE {
    return errorResp
}

额外的处理会使代码更加复杂。

因此,我建议忽略err变量。

    deviceResources[i].score, _ = orcheEngine.GetScoreWithResource(dev.resource)

所有6条评论

@tdrozdovsky这是由于我对工具lgtm持续分析如下。

https://lgtm.com/projects/g/lf-edge/edge-home-orchestration-go/alerts/?mode=list

我个人认为敏感数据是通过访问passPhraseJWTPath 。 你怎么认为? @tdrozdovsky

https://github.com/lf-edge/edge-home-orchestration-go/blob/22ce49b4b76ae78dfb75e14ef64399e5805c7d02/src/controller/securemgr/authenticator/authenticator.go#L70

这可能与以下潜在安全风险相同。

https://github.com/lf-edge/edge-home-orchestration-go/blob/22ce49b4b76ae78dfb75e14ef64399e5805c7d02/src/controller/securemgr/authenticator/authenticator.go#L84

好点,我知道并记住这个安全问题。

这些仅通知尝试创建passPhraseJWTFilePath文件失败。
但当然,将此类信息存储在文件(passPhrase、edge-orchestration.key 等)中存在安全风险。
我认为在未来这应该通过安全存储或访问控制系统来解决,例如:SeLinux、SMACK 等。

谢谢提醒

@tdrozdovsky感谢您接受我的建议。 我刚刚把这个问题交给了你。 我们期待很快看到您的另一项宝贵贡献!

@tdrozdovsky Plus,如果在我们的平台中使用了err ,您能纠正一下吗?

https://github.com/lf-edge/edge-home-orchestration-go/blob/22ce49b4b76ae78dfb75e14ef64399e5805c7d02/src/orchestrationapi/orchestration_api.go#L180

我研究了使用err变量。 错误处理在下面完成。

if len(deviceScores) <= 0 {
        return errorResp
} else if deviceScores[0].score == scoringmgr.INVALID_SCORE {
    return errorResp
}

额外的处理会使代码更加复杂。

因此,我建议忽略err变量。

    deviceResources[i].score, _ = orcheEngine.GetScoreWithResource(dev.resource)

@tdrozdovsky Plus,如果在我们的平台中使用了err ,您能纠正一下吗?
https://github.com/lf-edge/edge-home-orchestration-go/blob/22ce49b4b76ae78dfb75e14ef64399e5805c7d02/src/orchestrationapi/orchestration_api.go#L180

我研究了使用err变量。 错误处理在下面完成。

if len(deviceScores) <= 0 {
      return errorResp
} else if deviceScores[0].score == scoringmgr.INVALID_SCORE {
  return errorResp
}

额外的处理会使代码更加复杂。

因此,我建议忽略err变量。

  deviceResources[i].score, _ = orcheEngine.GetScoreWithResource(dev.resource)

@tdrozdovsky这是合理的。 ^^ 你能为此提出有关 PR 的建议吗?

此页面是否有帮助?
0 / 5 - 0 等级