본문 바로가기
Infra/(SCM) Git

Github Security

by 화뉘 2016. 7. 11.

Reference

Case Studies

기본적으로 Repository를 Clone 할 수 있는 URL에는 HTTPS 와 SSH가 있다.

HTTP or HTTPS Permission (Only Private Repository)

➜  git git clone https://github.com/yogiyo/Yogiyo_Web
Cloning into 'Yogiyo_Web'...
Username for 'https://github.com':
 
➜  git git clone https://github.com/yogiyo/Yogiyo_Web
Cloning into 'Yogiyo_Web'...
Username for 'https://github.com': wingsh
Password for 'https://wingsh@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/yogiyo/Yogiyo_Web/'

SSH Key Permission

➜  git git clone git@github.com:atto-test/atto-test.git
Cloning into 'atto-test'...
The authenticity of host 'github.com (192.30.252.130)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.130' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

SSH Key 제거 후, 접근 시 https://github.com/yogiyo/Yogiyo_Web/pull/2804#issuecomment-217333654

그러나 Private Repository라도 해당 Repository에 Access 할 수 있다면 Clone 또는 Download ZIP 기능을 사용할 수 있으니 주의해야 한다.

개인이 보안을 강화할 수 있는 방법에는 2단계 인증이 있다.

2단계 인증(Two-Factor authentication)

Github 계정을 가지고 있다면, 개인 계정의 ssh key를 Settings > SSH and GPG keys > SSH keys에 넣으면 되고,

없을 경우엔 Repository > Settings > Deploy keys에 넣으면 된다.

Audit

https://github.com/organizations/atto-test/settings/audit-log

Block users

https://github.com/organizations/atto-test/settings/user_blocks

Permission level for an organization


Owners

Members

Desription

Full administrative access

Customizable access

See all other members

(tick)(tick)
 Create teams(tick)(tick)
 Mention teams(tick)(tick)
 See all teams(tick)(tick)
 See all repositories(tick) (tick)
 Create repositories(tick)(tick)
 Invite new members(tick)(error)
 Access to billing(tick)(error)

Repository permission levels for an organization

Repository actionRead permissionsWrite permissionsAdmin permissionsOwner permissions
Pull (read), push (write), and clone (copy) all repositories in the organization


(tick)
Promote organization members to team maintainer


(tick)
Convert organization members to outside collaborators


(tick)
Create repositories (see "Creating repositories" for details)(tick)(tick)(tick)(tick)
Delete repositories (see "Deleting repositories" for details)

(tick)(tick)
Change a repository's settings (see "Changing repository settings" for details)

(tick)(tick)
Change a repository's visibility

(tick)(tick)
Transfer repositories into, and out of, the organization account

(tick)(tick)
Add a repository to a team (see "Adding a repository to a team" for details)

(tick)(tick)
Add outside collaborators to a repository

(tick)(tick)
Pull from (read) the team's assigned repositories(tick)(tick)(tick)(tick)
Push to (write) the team's assigned repositories
(tick)(tick)(tick)
Fork (copy) the team's assigned repositories(tick)(tick)(tick)(tick)
Send pull requests from forks of the team's assigned repositories(tick)(tick)(tick)(tick)
Merge and close pull requests
(tick)(tick)(tick)
Open issues(tick)(tick)(tick)(tick)
Close, reopen, and assign issues
(tick)(tick)(tick)
Close issues they opened themselves(tick)(tick)(tick)(tick)
Apply labels and milestones
(tick)(tick)(tick)
Have an issue assigned to them(tick)(tick)(tick)(tick)
Create and edit releases
(tick)(tick)(tick)
View draft releases
(tick)(tick)(tick)
View published releases(tick)(tick)(tick)(tick)
Edit and delete their own comments on commits, pull requests, and issues(tick)(tick)(tick)(tick)
Edit and delete anyone's comments on commits, pull requests, and issues
(tick)(tick)(tick)
Edit wikis(tick)(tick)(tick)(tick)
Create statuses
(tick)(tick)(tick)


'Infra > (SCM) Git' 카테고리의 다른 글

how to delete git remote branch  (0) 2016.04.28
Webhook  (0) 2016.04.25
Git bare repository sync  (0) 2016.04.19
Two-factor authentication on Github  (0) 2016.03.30
Git Basic Command  (0) 2014.09.16

댓글