
# 인가된 보안 연구 랩: CVE-2025-32958 (GHSA-8c7v-vccv-cx4q) 재현 — Adept의 remoteBuild.yml에 의해 워크플로 아티팩트로 유출된 GITHUB_TOKEN (AdeptLanguage/Adept @ 6a64554 스냅샷)
자동화된 연구 산출물 — 업스트림 프로젝트가 아님.
이 저장소는 Université Laval의 석사 논문에서 게시된 GitHub Actions 워크플로우 취약점을 재현하기 위해 자동화된 하네스가 구축한 일회용 실험실입니다. 이는 커밋
6a6455463213dabe52d49ceaaebd1f13cfee9018(2025-04-01) 시점의AdeptLanguage/Adept에 대한 그대로의 스냅샷이며, 해당 프로젝트의 자체 라이선스에 따라 재배포되며, 해당 라이선스 파일은 이 스냅샷에 변경 없이 포함되어 있습니다.업스트림 프로젝트는 관여하지 않으며, 결코 공격 대상이 아니며, 여기서 연구된 취약점은 이미 공개된 것입니다. 이 저장소의 모든 비밀과 변수는 무작위로 생성된 더미 값입니다 — 실제 자격 증명은 존재하지 않습니다. 액션 참조와 러너 이미지는 2025-04-01에 확인된 값으로 고정되어 있습니다. 스냅샷에 적용된 모든 변경 사항은 하네스 출력의
pinning.md를 참조하십시오.질문 또는 이의 제기: [email protected]
범용 프로그래밍을 위한 초고속 언어입니다.
adept [filename] [options]
여러 버전이 설치된 경우 adept 대신 adept2-7을 선택적으로 사용할 수 있습니다.
import basics
func main {
print("Hello World!")
}
import basics
func main {
name String = "Alan"
age int = 36
height uint = 189
print("Name is " + name)
print("Age is " + age)
print("Height is " + height + " cm")
}
import basics
func main {
greet("Alice")
}
func greet(name String) {
print("Hello " + name)
}
import basics
record Person (name String, age int) {
func print {
print(this.name + " is " + this.age + " years old")
}
}
func main {
Person("John Smith", 36).print()
}
import basics
struct Configuration (
filename String,
numBatteries int,
numPorts int,
){
constructor(filename String) {
this.filename = filename.commit()
this.numBatteries = 4
this.numPorts = 10
}
}
func toString(config Configuration) String {
return config.filename + ":" + config.numBatteries + ":" + config.numPorts
}
func main {
print(Configuration("settings.config"))
}
import basics
func main {
x, y int = 0
x++
y++
addOneTo(&x)
print("x = " + x)
print("y = " + y)
}
func addOneTo(pointerToNumber *$T~__number__) {
(*pointerToNumber)++
}
import basics
func main {
name String = scan("What is your name? ")
age int = scanInt("How old are you? ")
// If conditional
if name == "Isaac" {
print("Hello Isaac :)")
} else {
print("Nice to meet you " + name)
}
// Unless conditional
unless age > 21 {
print("You are too young to drink")
}
// While loops
while age < 18 {
print("**birthday**")
age += 1
}
print("You are now old enough to smoke")
// Until loops
until age >= 21 {
print("**birthday**")
age += 1
}
print("You are now old enough to drink")
}
import basics
record Invitation (to, from String, priority int)
func main {
invites <Invitation> List
invites.add(Invitation("Isaac", "Peter", 4))
invites.add(Invitation("Mr. Smith", "Mrs. Smith", 12))
invites.add(Invitation("James", "Paul", 3))
each Invitation in invites {
printf("invites[%zu] = %S\n", idx, toString(it))
}
}
func toString(invite Invitation) String {
return invite.to + " invited " + invite.from + " with priority " + invite.priority
}
/*
소유권 기반 메모리 관리를 사용하는 값의 경우
(예: String, List, Grid)
해당 값을 소유자의 범위보다 오래 유지하려면
소유권을 이전해야 합니다
*/
import basics
func main {
everyone <String> List = getEveryoneAttending()
each fullname String in everyone {
print("=> " + fullname)
}
}
func getEveryoneAttending() <String> List {
everyone <String> List
person1 String = getFullnameReturnImmediately("Alice", "Golden")
person2 String = getFullnameStoreAndThenLaterReturn("Bob", "Johnson")
// 'person1'과 'person2'가 보유한 문자열의 소유권을
// 리스트가 관리하도록 이전합니다
everyone.add(person1.commit())
everyone.add(person2.commit())
// 리스트의 소유권을 호출자에게 이전합니다
return everyone.commit()
}
func getFullnameReturnImmediately(firstname, lastname String) String {
// 여기서는 '.commit()'이 필요하지 않습니다
return firstname + " " + lastname
}
func getFullnameStoreAndThenLaterReturn(firstname, lastname String) String {
fullname String = firstname + " " + lastname
// 결과의 소유권은 'fullname'이 보유하므로,
// 이 함수가 반환된 후에도 값을 유지하려면
// 호출자에게 소유권을 이전해야 합니다
// 여기서는 '.commit()'이 필요합니다
return fullname.commit()
}
import basics
func main {
print(makeNumericSkewer())
print(makeAlphabetSkewer())
}
func makeNumericSkewer String {
// 예시 출력: `0-2-4-6-8-10-13-16-19-22-25-28`
skewer String
while continue preparing {
skewer.append(skewer.length)
if skewer.length < 30 {
skewer.append("-")
continue preparing
}
}
return skewer.commit()
}
func makeAlphabetSkewer String {
// 예시 출력: `a-c-e-g-i-k-m-o-q-s-u-w-y`
skewer String
while still_making_skewer : skewer.length < 30 {
skewer.append('a'ub + skewer.length as ubyte)
if skewer[skewer.length - 1] == 'y'ub {
break still_making_skewer
}
skewer.append("-")
}
return skewer.commit()
}
import basics
// 사용될 때마다 다시 평가됩니다
define GREETING = "Welcome"
define STRANGER_NAME = "guest"
define WELCOME_MESSAGE = GREETING + " " + STRANGER_NAME + "!"
// 프로그램 시작 시 한 번만 평가됩니다
ARCH_STRING String = #get __arm64__ ? "arm64" : #get __x86_64__ ? "x86_64" : "other"
func main {
print(WELCOME_MESSAGE)
print("You are using architecture: " + ARCH_STRING)
}
import 'sys/cstdio.adept'
import 'sys/cstdlib.adept'
import 'sys/cstring.adept'
func main int {
withMallocAndFree('Will', 'Johnson')
withNewAndDelete('John', 'Wilson')
return 0
}
func withMallocAndFree(firstname, lastname *ubyte) void {
// malloc, free, sprintf를 사용한 수동 C-문자열 조작
fullname *ubyte = malloc(strlen(firstname) + strlen(lastname) + 2)
defer free(fullname)
sprintf(fullname, '%s %s', firstname, lastname)
printf('Fullname is: %s\n', fullname)
}
func withNewAndDelete(firstname, lastname *ubyte) void {
// new, delete, sprintf를 사용한 수동 C-문자열 조작
fullname *ubyte = new ubyte * (strlen(firstname) + strlen(lastname) + 2)
defer delete fullname
sprintf(fullname, '%s %s', firstname, lastname)
printf('Fullname is: %s\n', fullname)
}
import basics
func main(argc int, argv **ubyte) {
// C 스타일
// 지정된 각 인수를 출력합니다
each *ubyte in [argv, argc] {
printf("args[%zu] = %s\n", idx, argv[idx])
}