Edge-home-orchestration-go: [ディスカッション] SecurityMgrを修正する必要がありますか? (機密データの処理)

作成日 2020年09月14日  ·  6コメント  ·  ソース: lf-edge/edge-home-orchestration-go

個人的には、 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

enhancement question

最も参考になるコメント

@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 Plus、 errがプラットフォームで使用されているかどうかを修正できますか?

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

@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 評価