{
"id": "c76bb23bafd88976ffcb3e721f47b144939d48ca2424750b4c1dcb2b089227b2",
"category": "sast",
"name": "Incorrect permission assignment for critical resource",
"description": "The application was found setting directory permissions to overly permissive values. Consider\nusing the following values if the application user is the only process to access\nfiles in the directory specified:\n- 0700 - read/write access to the files in the directory\n\nAnother common value is `0750` which allows the application user read/write access and group\nusers to read the files contained in the directory.\n\nExample creating a directory with read/write permissions for only the application user:\n```\nerr := os.Mkdir(\"directory\", 0700)\nif err != nil {\n log.Fatal(err)\n}\n```\n\nFor all other values please see:\nhttps://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation\n",
"cve": "semgrep_id:gosec.G301-1:95:95",
"severity": "Medium",
"scanner": {
"id": "semgrep",
"name": "Semgrep"
},
"location": {
"file": "core/rawdb/freezer.go",
"start_line": 95
},
"identifiers": [
{
"type": "semgrep_id",
"name": "gosec.G301-1",
"value": "gosec.G301-1"
},
{
"type": "cwe",
"name": "CWE-732",
"value": "732",
"url": "https://cwe.mitre.org/data/definitions/732.html"
},
{
"type": "owasp",
"name": "A01:2021 - Broken Access Control",
"value": "A01:2021"
},
{
"type": "owasp",
"name": "A5:2017 - Broken Access Control",
"value": "A5:2017"
},
{
"type": "gosec_rule_id",
"name": "Gosec Rule ID G301",
"value": "G301"
}
]
}